Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have created a web site on IIS 7.5 which using 91 port on a local server(ip:192.168.0.50) and i am using framework 4.5. When i try to display my web site on browser, html files comes normally but aspx files(which have also sql connenction) doesn't. And it gives error as below. I also gave the Administrator permission to the releated path and when i tested the settings, Authentication and Authorization comes ok. So you guys have any solution? Thanks.

Error:

Server Error in '/' Application.
Access is denied
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.ComponentModel.Win32Exception: Access is denied

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:
[Win32Exception (0x80004005): Access is denied]

[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)].....
Posted

1 solution

For windows the ports below 1025 are normally reserved. You can use an ephemeral (short lived) port in the range between 1025 and 5000. Or another in the range between 5000 and 60000.

Good luck!
 
Share this answer
 
Comments
AhmetOnnur 20-Oct-15 6:06am    
thanks for the reply but its same result, it doesn't work. Does port number effect that?
E.F. Nijboer 20-Oct-15 6:32am    
The "user" used to run the website must also have access to the database. You might want to create a new user (app pool) that can be used to run the website under in IIS and has access to your database.
AhmetOnnur 20-Oct-15 6:43am    
My app pool has Administrator identity so, it has to connect to sql server, right? Should i do something more on manegement studio or somewhere else?
E.F. Nijboer 20-Oct-15 11:12am    
Well... it depends, because often the Administrator account used is only a local account. Meaning it is no domain account and the database server won't accept it because it can't verify the account with the domain controller.

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


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900