Click here to Skip to main content
12,623,930 members (29,834 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET .NET IIS
I have jus now created a virtual directory and hosted my web application in iis 6. in my application i am using a login page,.the problem is it is not connecting to the database. what setting should i do to connect to the sql 2008 database.Help me friends...
Posted 9-Aug-12 3:43am
Comments
AlluvialDeposit 9-Aug-12 8:45am
   
what have you tried? Do you have any code?
ajithk444 10-Aug-12 0:27am
   
<add connectionstring="Data Source=(local)\SQLEXPRESS;Initial Catalog=ISSUserReigistration;Integrated Security=True" name="ISSUserReigistration">

this is the code i have used in my web config for connection string. I m using sql2008 r2.it supports windows authentication only.help me what to do for this configuration...
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hi,

Here you need to do steps to identify problem.

1) check if you connection string is correct in Config file.
2) check if your database server available.
3) add logging in your application to identify exception.

Actually some exception occur from your application but you may have not creating logging so not getting exact error message.

Please Add Logging in you code and then you will identify your issue.

Hope this information helps you,

Thanks
-Amit Gajjar.
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Check application pool user. If you use integrated security, the user impersonated by the pool will try to connect to the database, thus needs to have all required rights. You also need to check if the database server and service can be contacted from the web server from network and firewall point of view. The exact exception message you get will help you in identifying the problem - and if you add it to your post, we also can help you in it.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.161128.1 | Last Updated 9 Aug 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100