Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,

I am using asp.net,C#,VS 2005,and sql server 2005
I have created a setup file for my web project...
I have also installed IIS in my PC..
my database (.mdf) file is in App_Data folder
I have installed my project now ...

my web.config contains the following connection string:
XML
<connectionStrings>
        <add name="conStr" connectionString="Trusted_Connection=true;pwd=;Initial Catalog=CLINICAL;Data Source=(local)" providerName="System.Data.SqlClient"/>       
    </connectionStrings>



But when i type http://localhost/WebSetup1/Firstpage.aspx

It will display a page..

But when i click on page that contains connection with the database it is not shown or executed..

It will give error message like Login Failed to KARAN\ASPNET..
but if i run from Visual studio no problem at all..Its working properly..

I have installed sql server in my pC.


In short : database connection is not established.. or data is not fetched from the database..

Please help me ....
Thanks in Advance.

regards
karan
Posted

It's most likely that the permissions are incorrect. This will help[^] to get you started.
 
Share this answer
 
Comments
karan joshua 23-May-11 5:07am    
thank u for your solution sir... I got the problem cleared....
More to digital man's answer, you can use different connection string with SQL user credentials, or give ASPNET user required rights on you database.
http://www.dnzone.com/go?503[^]
 
Share this answer
 
Comments
karan joshua 23-May-11 5:04am    
good job sir... u have provided with the essential link...

Finally i got it... your tutorial was very helpful...

struggling for 5 days with this problem...
Thank u sir...

THANK U..THANK U..THANK U..THANK U..THANK U..THANK U..THANK U..

THANK U..THANK U..THANK U..THANK U..THANK U..THANK U..


THANK U..

THANK U..

THANK U..
Prerak Patel 23-May-11 5:05am    
You are most welcome.
Are you install IIS before install VS.Net or after that?If you install after that then it create problem like that.
 
Share this answer
 
Comments
karan joshua 23-May-11 4:48am    
ya i have installed after installing VS.net

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900