" System.ComponentModel.Win32Ex ... [英] "System.ComponentModel.Win32Ex...

查看:68
本文介绍了" System.ComponentModel.Win32Ex ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我在IIS 7.5上创建了一个使用本地服务器上的91端口(ip:192.168.0.50)的网站,我正在使用框架4.5。当我尝试在浏览器上显示我的网站时,html文件正常,但aspx文件(也有sql连接)没有。它给出了如下错误。我还向管理员授予了相关路径的权限,当我测试设置时,身份验证和授权就可以了。那么你们有什么解决方案吗?谢谢。



错误:



'/'应用程序中的服务器错误。

访问被拒绝

描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。



异常详细信息:System.ComponentModel.Win32Exception:访问被拒绝



源错误:

在执行当前Web请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。

堆栈跟踪:

[Win32Exception(0x80004005):访问被拒绝]



[SqlException(0x80131904):建立与SQL Server的连接时发生与网络相关或特定于实例的错误。服务器未找到或无法访问。验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。 (提供者:命名管道提供程序,错误:40 - 无法打开与SQL Server的连接)] .....

解决方案

对于Windows,1025以下的端口是通常保留。你可以在1025到5000之间的范围内使用短暂的(短暂的)端口。或者在5000到60000之间的范围内使用另一个端口。



祝你好运!

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)].....

解决方案

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!


这篇关于" System.ComponentModel.Win32Ex ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆