Showing posts with label dedicated. Show all posts
Showing posts with label dedicated. Show all posts

Sunday, March 25, 2012

Connecting to SQL database

I am moving my site from a shared environment to a dedicated server and SQL is on the same box. How do I connect to my database if it's on the same box?in your connection string, reference your data source or server as "." or (local)|||

Thank you. This is my first time setting up a SQL server. Is there a special login account I need to set up for my web pages to use?

|||you can use integrated security... if your running win2003, the account will be [network service], if xp pro, [aspnet]
if you want to use sql server authentication, add a user to your server, make the user a dbo over your database. but this way, you have to put the username and pw into the query string. :)
http://www.connectionstrings.com/ <-- that might help|||

I just uploaded a training video that covers this. :)
http://www.dotnetnukerocks.com/Administering/GettingStarted/Installation/DotNetNukev40InstallVideo/tabid/2574/Default.aspx

Sunday, February 12, 2012

Connect to sql server from asp.net web app

Hi,
I have a website on a dedicated web server that can't communicate with a sql server 2000 database sitting behind a firewall. My website is written in asp.net 2 and c# 2 and port 1433 has been opened through the firewall to allow access. On the db server is an admin database set up to use asp.net authentication. I am running Visual Web Dev 2005 Express on the web server to test the application and initially I want to connect to that db and set up my app and asp 'admin' users. For that I would normally use the 'Website/ ASP.NET Configuration' menu option within the IDE. At the moment I just get a connection error:

Server Error in '/asp.netwebadminfiles' Application.

------------------------

Access is denied.

Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.

------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Server Error in '/asp.netwebadminfiles' Application.

------------------------

Access is denied.

Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.

------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Now which server is the problem on - the web server?? What do I need to do to connect with this db? Help! Thanks in advance.

Chris

Look at the IIS logs to see what request generated the 401.2 result code.

Jeff