2013-05-13 100 views
3

我有一些麻煩,我認爲問題是Webresource.axd文件。我在.NET 4.5和Visual Studio 2012 Web Developer Express中使用ASP.NET Web窗體。得到一個錯誤,可能是WebResource.axd

我在我的aspx文件中聲明瞭一個treeview,並在代碼隱藏中將數據分配給了treeview。這工作,但我成了一些失蹤的圖片,但我使用標準的Systemset。 so it it shown in the Browser

這裏是我的代碼:

的.aspx:

<asp:TreeView ID="treeview" runat="server" ShowLines="True" ImageSet="Arrows"> 

</asp:TreeView> 

.aspx.cs:

protected void Page_Load(object sender, EventArgs e) 
{ 
    if (!Page.IsPostBack) 
    { 
     Logic.TreeView("FILE", treeview); 
    } 
} 

的web.config:

<?xml version="1.0" encoding="utf-8"?> 

<!-- 
    Weitere Informationen zum Konfigurieren der ASP.NET-Anwendung finden Sie unter 
    http://go.microsoft.com/fwlink/?LinkId=169433 
    --> 

    <configuration> 
    <system.web> 
    <compilation debug="true" targetFramework="4.5" /> 
    <httpRuntime targetFramework="4.5" /> 

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

    </system.web> 
    <system.serviceModel> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> 
    <standardEndpoints> 
     <webHttpEndpoint> 
     <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" crossDomainScriptAccessEnabled="true"/> 
     </webHttpEndpoint> 
     <webScriptEndpoint> 
     <standardEndpoint crossDomainScriptAccessEnabled="true"/> 
     </webScriptEndpoint> 
    </standardEndpoints> 
    </system.serviceModel> 


    <system.webServer> 
    <validation validateIntegratedModeConfiguration="false"/> 
    </system.webServer> 


</configuration> 

當我開始d ebugging我得到一個JS錯誤,但只在IE中,而不是在Chrome中。 Microsoft JScript中 運行時錯誤:「WebForm_InitCallback」 IST未定義

別人的幫助,我真的沒有一些想法如何解決這個問題。

回答

0

夫婦的簡單的事情先試:

是否在指定的位置的文件(可能使用Firebug或類似看元素,找到位置,可能與〜/ ./路徑相混淆) 。

如果您使用的是服務器操作系統,那麼您是否在服務器管理器中勾選了「靜態內容」角色,否則CSS和圖像將不會顯示。