InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



MSDE connection woe Expand / Collapse
Author
Message
Posted 18/05/2007 08:23:40
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 05/07/2007 09:18:25
Posts: 10, Visits: 12
Hi, I've bought IF and trying to get it going.

The installer has created a DB in my MSDE server

When  I try to run the site, I get :

Exception Type:        System.Data.SqlClient.SqlException
Exception Message:     Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Exception Source:      .Net SqlClient Data Provider
Exception Target Site: GetConnection

Looks like the app can't connect to my DB....but I can't see why.

My connection string in web.config is:

server=localhost;trusted_connection=true;database=InstantForum414

I've tried 127.0.0.1, (local), S1523xxx (the server name), but all to no avail.

TCP is enabled for MSDE, on 1433

I just don't know what to try now... any ideas...?

Could I use a hard coded non-trusted connection using SQL authentication?

Is the web.config the ONLY place that the connection is defined?

Thx in advance


 

Post #12822
Posted 18/05/2007 09:01:36


IF.NET 4.2 Coming Soon

IF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming SoonIF.NET 4.2 Coming Soon

Group: Administrators
Last Login: 2 days ago @ 20:25:08
Posts: 1,953, Visits: 3,011
Hi Andy,

Try adding the NETWORKSERVICE windows account to the InstantForum414 database within MSDE and give this db_owner privledges. If you don't have a GUI available you'll need to use OSQL. You can use the SQL below to associate a user...

USE [InstantForum414]
GO
DECLARE @username SYSNAME
SELECT @username = HOST_NAME() + '\NETWORKSERVICE
USE Master
EXEC sp_grantlogin @username
USE [InstantForum414]
EXEC sp_grantdbaccess @username
EXEC sp_addrolemember N'db_owner', @username
GO

You'll need to save this locally to say AddForumUser.sql then use OSQL to execute this against your database from the command prompt...

osql -E -S (local)\instance_name -i c:\AddForumUser.sql

If you have a GUI such as MSDE admin or the SQL Server Web Data Administrator this could be a little easier.

I hope this helps. Please respond if you continue to have any problems.


Kindest Regards,

Ryan Healey
Director / Developer

Explore our products...
http://demos.instantasp.co.uk/

Post #12823
Posted 18/05/2007 09:11:24
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 05/07/2007 09:18:25
Posts: 10, Visits: 12
Thank you very much for your suggestion, however, I've resolved this another way, (by changing the connection to use explicit SQL authentication, rather than a trusted connection.)

I can see the forum now on my test page and from my remote connection.

BTW there seems to be a small bug in your installer. The "Test page" shortcut placed in the start menu tries to launch:

http://localhost/instantforum414/

But the installer has created the application as InstantForum413 in IIS, so the above should read:

http://localhost/instantforum413/

to make it work

Thanks again for your reply though, but I'm more familiar with SQl authentication, so I'll leave it at as it is if it all works

Andyf

Post #12824
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, Bare, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 7:20am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 11 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.