if anyone would have any idea how I can solve it - as it's driving me nuts!.
On my local machine (I've MDSN) running with Web Matrix - my connection works fine.
However since i've uploaded it to my Hoster - Forms and DB - I get the error
Cannot open database requested in login 'TestDB'. Login fails. Login failed for user AUTHORITY\NET SERVICE'.
Can anyone give me any pointers on where I should be going?
I've been told by my Hosting co. that the server should be set to localhost (as shown)
but thats about it!
My Web.config file looks like:-
<configuration>
<!-- application specific settings -->
<appSettings>
<add key="ConnectionString" value="server=localhost;Trusted_Connection=true;database=TestDB" />
</appSettings
<!-- forms based authentication --
<system.web>
<!-- enable custom errors for the application -->
<customErrors mode="Off"/>
<!--RemoteOnly" defaultRedirect="ErrorPage.aspx" -->
<!-- disable session state for application -->
<sessionState mode="Off" />
</system.web>
</configuration
Thanks in advance for any help.
Dave.Did the host say whether you should use NT Authorization or Sql Authorization? You are using NT Authorization now but perhaps it should be Sql Authorization. If so you'll have to change your connection string to something like:
data source=localhost;initial catalog=TestDb;password=whatever;user id=whatever;packet size=4096
Of course you'll need to find out what username and password to use.|||I know netiquete etc but had to thank you!
Just like to say thanks for that invaluable piece of information!
If anyone else has the problem i've been getting then the solution proposed by McMurdoStation was absolutly spot on.
Thanks again.
Dave|||Your welcome.
No comments:
Post a Comment