Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2008-04-25 : 14:50:37
|
I am attempting to set up web Pages for Internal use.Since I already have many SQL security settings based on Windows Authentication I wish to carry this through for access to web sites.My IIS Server is set to Intigrated Windows Authentication and Anonymous access is disabled.The web config file is set also for Intigrated Authentication. <connectionStrings> <add name="StockSLSConnectionString" connectionString="Data Source=SERVERONE;Initial Catalog=StockSLS;Integrated Security=True"/> </connectionStrings> <system.web> <identity impersonate="true"/> <authentication mode="Windows" /> </system.web>The pages function correctly in visual studio 2005 usung the Localhost IIS. However when I publish the Project to the IIS server The connection to the SQL server Fails.SqlException (0x80131904): Login failed for user '(null)'.My guess is there is a problem with the IIS but dangged if I can figure out what.JimUsers <> Logic |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-04-25 : 21:49:52
|
Is that wondows account a valid sql login? |
 |
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2008-04-28 : 09:58:40
|
Yes the windows account is valid.The Problem is the IIS is passing a null Value to the SQL server. Instead of the Windows Login.JimUsers <> Logic |
 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2008-04-28 : 10:41:17
|
the account that runs the IIS service, is it allowed to connect to the DB? just an idea.. never have done it before--------------------keeping it simple... |
 |
|
uberman
Posting Yak Master
159 Posts |
Posted - 2008-04-28 : 10:52:26
|
looong time since I did this... but the short answer isCreate domain user "iis_sql". Under IIS edit the properties of the web site and run the site as that userAdd the domain user "iis_sql" to the sql server and give the right to the db "StockSLS"There may be certain rights that the domain in and of itself needs (network access, log on, cant remember) but that should get you started |
 |
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2008-04-28 : 12:40:03
|
Ok lets see if I can make it more clear.I know how to work around it by logging on as a SQL user in the Web.config and assigning access to that user.I want to use Windows Security because.1. Different users have different levels of security access. (more than 10 groups)2. The Access levels have already been assigned to hundeds of tables forms Sps and views.I need to find out what is happening to the call from IIS to the SQL server.Oh and Jen the SQL server is run on the domain\administrator account and so is the IIS.JimUsers <> Logic |
 |
|
|
|
|