网络资源.axd? - 500内部服务器错误

发布于 2024-07-20 06:55:22 字数 3323 浏览 11 评论 0原文

我正在尝试使用 obout 控件库中的文件上传控件,我真的很喜欢它,并且认为它非常流畅,没有任何 flash!...

我下载了整个安装程序,使用了示例中的设置,并使控件准确运行如我所愿。

我在 vs2008 中创建了一个全新的 Web 应用程序,其中包括 web.config、dll 和带有样式代码的文件夹,以及我经过调整以提供所需输出的 ​​aspx 页面。

我构建了新项目,并运行它,加载了控件,并且工作正常。


现在我想在我一直在处理的现有项目中使用它,所以我复制了 web.config 值、dll 以及带有样式代码和我调整的 aspx 页面的文件夹。

我将它们放入我对其他项目所做的相同位置,构建它并运行页面.. 所有内容都已加载,但是当我单击按钮时,我收到了 webresource.axd 错误,实际上是 2,最后都进行了加密。

经过一些研究后,看起来 webresource.axd 可用于动态加载 javasript 和 css 文件等...所以我现在的猜测是控件使用它作为隐藏方式来包含它需要的 javascript 文件..并且它在这些方面的失败包括......这让我感到困惑。

我已经从我的项目中删除了所有内容,但它仍然失败,我发现一篇文章指出它可能是站点的 iis 配置,所以我检查了,我有到 .net 2.0 lib 文件的映射,带有 axd扩展..所以我怀疑这就是问题所在,但是我确实删除并重新创建了iis站点..但它仍然不起作用...

我也将这一行包含在网络配置中..

<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader" validate="true"/>

这似乎也没有帮助..

有谁知道我可以去哪里?...

编辑: 我在事件查看器中遇到了这个。global.asax

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 05/05/2009 2:38:16 PM 
Event time (UTC): 05/05/2009 6:38:16 PM 
Event ID: 8579dbce2f5844169b1740bb95ebffb1 
Event sequence: 8 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/1/Root/SVN_WORKSPACE/WWWROOT/WorkEstimateSystem-12-128860222914549340 
    Trust level: Full 
    Application Virtual Path: /SVN_WORKSPACE/WWWROOT/WorkEstimateSystem 
    Application Path: c:\inetpub\wwwroot\SVN_WORKSPACE\WWWROOT\WorkEstimateSystem\ 
    Machine name: GREGE6500 

Process information: 
    Process ID: 2276 
    Process name: aspnet_wp.exe 
    Account name: GREGE6500\ASPNET 

Exception information: 
    Exception type: HttpException 
    Exception message: Session state is not available in this context. 

Request information: 
    Request URL: http://localhost/SVN_WORKSPACE/WWWROOT/WorkEstimateSystem/WebResource.axd?d=gPWI1Nyst2kh_ORsvV-AHCh4GSmizSjDuHRCpBgAKBsmi1Zr6e44K950Zcfsdc4p2GuNTPmRl4yAADV0USSNLFQQ7sk-iY1WVt4JJWJE_yg1&t=633771228432707325 
    Request path: /SVN_WORKSPACE/WWWROOT/WorkEstimateSystem/WebResource.axd 
    User host address: 127.0.0.1 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: GREGE6500\ASPNET 

Thread information: 
    Thread ID: 8 
    Thread account name: GREGE6500\ASPNET 
    Is impersonating: False 
    Stack trace:    at System.Web.HttpApplication.get_Session()
   at GlobalClass.CURRENT_EMPLOYEE_ID()
   at GlobalClass.checkLogin(String pagerequested)
   at GlobalClass.Application_OnPostRequestHandlerExecute(Object sender, EventArgs e)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Custom event details: 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

有一些会话启动和结束功能以及应用程序启动和结束功能。有什么方法可以简单地说明请求是否来自 axd 执行不同的操作或不执行某些操作运行这些自定义函数?

已修复:

在 global.asax 页面内..

    Sub Application_OnPostRequestHandlerExecute(ByVal sender As Object, ByVal e As EventArgs)
select case requestedPageName
   case "webResource.axd"
    exit sub

这修复了它!

im trying to use a file upload control from the obout control library, i really like it, and think its quite slick without any flash!..

i downloaded the entire installer, played with the settings in the samples, and made the control act exactly as i wanted.

i created a brand new web application ins vs2008, and included the web.config, dlls, and folders with style code, as well as the aspx page that i had tweaked to give me the desired output.

i built the new project, and ran it, the control loaded, and works fine.


now i want to use this in the already existing project that i have been working on, so i copied the web.config values, the dlls, and the folders with the style code and the aspx page that i tweaked..

i put them in the same locations i did with the other project, built it and ran the page..
everything loaded however when i clicked on a button i got a webresource.axd error, 2 actually, both with encryption at the end.

after doing some research, it looks like the webresource.axd can be used to dynamically load javasript and css files etc... soo my guess at this point is the control uses this as a hidden way to include javascript files it requires.. and its failing on those includes.. which baffles me.

i have stripped out everything from my project, and it is still failing, i found an article that stated it could be the iis configuration of the site, so i checked, i have the mapping to the .net 2.0 lib file, with the axd extension.. so i doubt that was the issue, however i did delete and recreate the iis site.. and it still does not work...

i have included this line as well in the web config..

<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader" validate="true"/>

this also did not seem to help..

does anyone know where i can go with this?...

EDIT:
i came across this in the event viewer..

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 05/05/2009 2:38:16 PM 
Event time (UTC): 05/05/2009 6:38:16 PM 
Event ID: 8579dbce2f5844169b1740bb95ebffb1 
Event sequence: 8 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/1/Root/SVN_WORKSPACE/WWWROOT/WorkEstimateSystem-12-128860222914549340 
    Trust level: Full 
    Application Virtual Path: /SVN_WORKSPACE/WWWROOT/WorkEstimateSystem 
    Application Path: c:\inetpub\wwwroot\SVN_WORKSPACE\WWWROOT\WorkEstimateSystem\ 
    Machine name: GREGE6500 

Process information: 
    Process ID: 2276 
    Process name: aspnet_wp.exe 
    Account name: GREGE6500\ASPNET 

Exception information: 
    Exception type: HttpException 
    Exception message: Session state is not available in this context. 

Request information: 
    Request URL: http://localhost/SVN_WORKSPACE/WWWROOT/WorkEstimateSystem/WebResource.axd?d=gPWI1Nyst2kh_ORsvV-AHCh4GSmizSjDuHRCpBgAKBsmi1Zr6e44K950Zcfsdc4p2GuNTPmRl4yAADV0USSNLFQQ7sk-iY1WVt4JJWJE_yg1&t=633771228432707325 
    Request path: /SVN_WORKSPACE/WWWROOT/WorkEstimateSystem/WebResource.axd 
    User host address: 127.0.0.1 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: GREGE6500\ASPNET 

Thread information: 
    Thread ID: 8 
    Thread account name: GREGE6500\ASPNET 
    Is impersonating: False 
    Stack trace:    at System.Web.HttpApplication.get_Session()
   at GlobalClass.CURRENT_EMPLOYEE_ID()
   at GlobalClass.checkLogin(String pagerequested)
   at GlobalClass.Application_OnPostRequestHandlerExecute(Object sender, EventArgs e)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Custom event details: 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

the global.asax has some session start and end functions as well as application start and end functions.. is there any way to simply say if request is coming from an axd do something different or dont run these custom functions?

FIXED:

inside the global.asax page..

    Sub Application_OnPostRequestHandlerExecute(ByVal sender As Object, ByVal e As EventArgs)
select case requestedPageName
   case "webResource.axd"
    exit sub

this fixed it!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

蓝礼 2024-07-27 06:55:22

“Application_OnPostRequestHandlerExecute”方法针对 .Net 处理的所有请求运行。 这包括“webresource.axd”。 在该方法中,检查当前 URL 是否为“webresource.axd”。 如果是,则不要使用该会话。

The "Application_OnPostRequestHandlerExecute" method runs for ever request that .Net handles. This includes "webresource.axd". In that method, check to see if the current URL is "webresource.axd". If it is, then don't use the session.

单身狗的梦 2024-07-27 06:55:22

我使用的是 Farpoint Spread,它只显示一页,其中有很多行。 这是我首先尝试的 C# 版本(它不起作用):

Global.asax:
    protected void Application_OnPostRequestHandlerExecute(object sender, EventArgs e  )
    {
        String requestedPageName = VirtualPathUtility.GetFileName(Request.FilePath);
        switch (requestedPageName)
        {
            case "WebResource.axd":
                return;
        }
    }

此链接的解决方案对我有用,但我必须提高数字:
http://www. acumen-corp.com/Blog/tabid/298/EntryId/8/ASP-NET-Error-ThrowIfMaxHttpCollectionKeysExceeded.aspx

Web.Config:
   <appSettings>
        <add key="aspnet:MaxHttpCollectionKeys" value="5000" />
   </appSettings>

此相关帖子使用相同的解决方案:
'操作由于回发期间对象的当前状态错误而无效

I am using a Farpoint Spread that only shows one page with alot of rows on it. Here is the c# version of what I tried first ( it did not work ):

Global.asax:
    protected void Application_OnPostRequestHandlerExecute(object sender, EventArgs e  )
    {
        String requestedPageName = VirtualPathUtility.GetFileName(Request.FilePath);
        switch (requestedPageName)
        {
            case "WebResource.axd":
                return;
        }
    }

The solution at this link worked for me but I had to raise the number higher:
http://www.acumen-corp.com/Blog/tabid/298/EntryId/8/ASP-NET-Error-ThrowIfMaxHttpCollectionKeysExceeded.aspx

Web.Config:
   <appSettings>
        <add key="aspnet:MaxHttpCollectionKeys" value="5000" />
   </appSettings>

This related post uses the same solution:
'Operation is not valid due to the current state of the object' error during postback

掀纱窥君容 2024-07-27 06:55:22

就我而言,Web 目录中有名为 "ScriptResource.axd""Telerik.Web.UI.WebResource.axd" 的子文件夹,其中包含一些 web.config 文件。 解决方案是删除该子文件夹。

In my case there was in web directory subfolders named "ScriptResource.axd" and "Telerik.Web.UI.WebResource.axd" with some web.config file. Solution was deleting this subfolders.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文