i've created a virtual directory for my asp.net application that includes an SQL connection. I have given the connection string in web.config file. though the page opens, i get a connection error.
plz help me out !! :(
Printable View
i've created a virtual directory for my asp.net application that includes an SQL connection. I have given the connection string in web.config file. though the page opens, i get a connection error.
plz help me out !! :(
Amit, could u pls provide the code how r u using connection and what the error u got actually. Then its I'll be able to understand the problem.
---V V----
Regards,
Vikas Vaidya
[QUOTE=vikasvaidya;26198]Amit, could u pls provide the code how r u using connection and what the error u got actually. Then its I'll be able to understand the problem.
---V V----
Regards,
Vikas Vaidya[/QUOTE]
[B]first of all i use asp.net 2.0
i created my connection in web.config
[QUOTE]<appSettings>
<add key="conn" value="server=.;database=online_shopping;integrated security=true"/>
</appSettings>[/QUOTE]
in form_load of frmLogin.aspx:
Try
con = New SqlConnection(ConfigurationManager.AppSettings("conn"))
con.Open()
Catch ex As Exception
Response.Write("Connection Error")
End Try
i created a new virtual directory & gave it read & run permissions. then i went to the properties tab of the above created virtual directory & clicked the documents tab. i added frmLogin.aspx & moved it to top.
in ie:
[QUOTE][url]http://localhost/mylogin[/url][/QUOTE]
the page opend with the error i specified in catch block.[/B]