Showing posts with label iis. Show all posts
Showing posts with label iis. Show all posts

Sunday, March 11, 2012

"SQL Server does not exist or access denied", again...

I'm have that darn problem...

Here is our setup:

Remote clustered SQL Server 2000 running on a Windows Server 2003 Enterprise Edition box.

Local IIS 5.1 web server (my development box) running on Windows XP Tablet Edition.

I'm using Visual Studio.Net 2003 and using ASP.Net 1.1.4322.

I have an ASP.Net application that hits the remote SQL Server. When I'm on my development box and viewing my ASP.Net project locally via IE, the application retrieves values from the remote SQL Server with no problems. If I get onto another machine, launch IE, and then hit my development box's web server (which is running the asp.net app), I get the dreaded "SQL Server does not exist or access is denied" msg.

In my ASP.Net app, I have impersonate set to true and the website is set only to windows authentication. The remote SQL Server is set to SQL and Windows authentication.

I'm at a loss on what to do, any help would be greatly appreciated.

Thanks,

ExitusLSU

Hi,

This seems to be firewall issue.
Check it after disabling firewall.
http://bhatiaworld.blogspot.com/2005/12/dot-net-error-aspnet-website-or-web.html|||

I also forgot to mention my connection string. It is:

"Data Source=<server name>;Integrated Security=SSPI;Initial Catalog=<database name>"

I've tried using the IP address, but that didn't work.

Thanks,

ExitusLSU

"SQL Server does not exist or access denied" error message

Hello!

When I start my .aspx with ASP.NET Web Matrix Server, it work, but when i try to start it with IIS I get error message.

TIA,

Misha

What is your connection string to the database like? Are you using a trusted connection? Is IIS running under a different account than Web Matrix? SQL Server needs to know about which accounts are acceptable.

|||string ConnectionString = "server=SERVER;database=pubs;trusted_connection=true";
SQL is on server PC, Web Matrix on Workstation.

Thursday, March 8, 2012

"rsAccessDenied" Error when Anonymous User from a Virtual directory access the Reporting S

Hi,
My setup is that i have a IIS virtual directory with Anonymous user (
enable anonymous ) to access Reporting Server. Both are in same server
anyway.
I have a web page in the virtual directory with url link to the
Reprting Server.
if I grant this anonymous user with admin privilege , then it works.
Why ' what kind of privilege is needed in fact ? There are some clue
but i dont know how to intepret.
The error log from Event log is as below:
Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10016
Date: 18/01/2006
Time: 10:41:23
User: NT AUTHORITY\NETWORK SERVICE
Computer: SVR071
Description:
The application-specific permission settings do not grant Local
Activation permission for the COM Server application with CLSID
{BA126AD1-2166-11D1-B1D0-00805FC1270E}
to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This
security permission can be modified using the Component Services
administrative tool.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.What is the configured identity of the 'ReportServer' service? Is it
interactive user? What is the security configuration for the
ReportServer virtual directory? What is the security configuration for
connecting to your SQL serrver?
If you're accessing the virutal directory as an anonymous user and the
RS service is configured to run as the interactive user, then the
interactive user (in this case anonymous) would need priviledges to
connect to SQL and any other necessary resources.
Andy Potter

Saturday, February 25, 2012

"Login failed for user MyPC/ASPNET"

Hi

I created my DB in SQL 2005 Express in VS IDE. I have my app in IIS. When I try to use the DB (e.g. try to login a user in the app) it gives me the following error:

Cannot open database "cvRepository" requested by the login. The login failed.
Login failed for user 'MyPC\ASPNET'.

My guess was that I had to give permissions to ASPNET user so I did in SQL Server Management. Still not working! Checked my Connection string and I think it's fine...

connectionString="Data Source=.\SQLEXPRESS;Database=cvRepository;Integrated Security=True;User Instance=True"

Still not working!

Can anyone explain me what's wrong and to solve this?!

Try replacing Database=cvRepository withAttachDBFileName=|DataDirectory|cvRepository.mdfin your connectionString.

Hope this helps.

Mike

|||Do you have a database namedcvRepositoryon your SQL server? Or you're using a database file attached at runtime? Anyways you have to ensure the ASPNET account has login permission to the SQL server, as well as access permissions on the required database.|||

Hi

Tried using the AttachDBFileName but nothing:

<

addname="cvRepositoryConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDBFileName=|DataDirectory|cvrepository.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient" />I don't understand much of this but I'll shoot out something... When running the app in debug mode (http://localhost:2431/cvRepository/Default.aspx) it creates an instance of the SQL Server but when not doing so (http://localhost/cvRepository/Default.aspx) it doesn't, that's why I can't access the DB. Is this correct? If so, how to solve it?

Any explanation/article would be helpful!

Thx

|||Try to add the ASPNET login to a member ofsysadminordbcreatorserver role.|||

Hi

Instead of using User Instances I defined a particular user to access the DB. Used this:

connectionString

="Server=.\SQLEXPRESS;Database=cvrepository;User ID=user1;Password=user1pass"

Thx for your help

Cheers

Sunday, February 19, 2012

"Invalid authorization specification"

Hello,

I have a web application (ISAPI) that accesses a SQL Server 2000 (sp3) database in the same machine as the Web Server (IIS 6). Windows 2003 Standard Edition is the operating System. So, when users access the aplication through the web it runs ok until display the error message "Invalid authorization specification" or, sometimes, another message about failure to inform ODBC DSN, although I dont use ODBC.

When the error occurs, the user press F5 in the browser and the operation goes ok. It's an intermitent and curious error.

Can somebody help me?

Thanks in advance.

Ado.I have no clue

http://www.easysoft.com/products/9999/faq_answer.phtml?ID=123&product=2002

ok, now with the pot shots...

Thursday, February 9, 2012

"Cannot Open Database" problem when copy project to IIS

Hi all.

I use VWD 2005 Express with SQL Server 2005 Express as a database.

I copy my project to IIS and try to run it at the IIS Web Server.

I already amended the connection string at web.config file as below:

<connectionStrings> <add name="GeekSpeakConnectionString" connectionString="Data Source=SEN-M09\SQLEXPRESS;Database=GeekSpeak.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient" /></connectionStrings>
But, I got this error:

Cannot open database "GeekSpeak.mdf" requested by the login. The login failed.
Login failed for user 'SEN-M09\ASPNET'.

I also has granted to userSEN-M09\ASPNET .Still, I got this error. Why?

I manage to solve this problem after reading the articlehere.

Thanks.

"C:\INETPUB\WWWROOT\SLEPCHA\APP_DATA\ASPNETDB.MDF" because the database is read-only.

i have created a appl and deployed it in IIS .

When i login from the login page i get a error :Server Error in '/slepcha' Application.
------------------------

Failed to update database "C:\INETPUB\WWWROOT\SLEPCHA\APP_DATA\ASPNETDB.MDF" because the database is read-only.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:\INETPUB\WWWROOT\SLEPCHA\APP_DATA\ASPNETDB.MDF" because the database is read-only.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

Have you checked to see whether that file has the ReadOnly attribute set?