2014-12-09 1 views
1

Visual Studio 2012에서 프로젝트를 실행할 때 사용하는 ASP : 버튼이 올바르게 작동합니다. 그러나 IIS 6.1 프로젝트를 게시 할 때 단추의 클릭 이벤트 처리기가 호출되지 않습니다. 서버에서 실행중인 프로세스에 Visual Studio를 연결하고 포스트 백이 실행 중이지만 클릭 핸들러가 호출되지 않았 음을 확인했습니다.asp : iis에서 프로젝트를 실행할 때 asp : button click 이벤트가 실행되지 않음 6.1

다음은 내 web.config와 함께 페이지와 코드입니다.

Default.aspx를

<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="BIR_Injuries._Default" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
    <link rel="Stylesheet" type="text/css" href="Styles/main.css" /> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div id="wrap"> 
     <div id="divFields" runat="server"> 
      <hr /> 
      <telerik:RadTextBox ID="rtb_ID" Visible="false" runat="server"></telerik:RadTextBox> 
      <table cellspacing="3" cellpadding="3" border="0"> 
       <tr> 
        <td valign="top">&nbsp;</td> 
        <td valign="top"> 
         <asp:button id="RadButton1" runat="server" text="Submit" AutoPostBack="true" CausesValidation="false" OnClick="RadButton1_Click"></asp:button> 
        </td> 
       </tr> 
      </table> 
     </div> 
     <div id="divSent" runat="server"> 
      <p>Your injury assessment has been submitted. <asp:HyperLink ID="hlSendAnother" runat="server" NavigateUrl="~/Default.aspx" Text="Send another"></asp:HyperLink>.</p> 
     </div> 
    </div> 
    </form> 
</body> 
</html> 

Default.aspx.vb

Imports Telerik.Web.UI 
Imports System.Net 
Imports System.Net.Mail 
Imports System.Data.SqlClient 
Imports System.Configuration 

Partial Class _Default 

    Inherits System.Web.UI.Page 

    Public Testing As Boolean = False 

    Protected Sub Default_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load 
     divSent.Visible = False 
     If Request.QueryString("iid") IsNot Nothing Then 
      rtb_ID.Text = Request.QueryString("iid") 
     Else 
      rtb_ID.Text = Guid.NewGuid.ToString 
     End If 
     If Testing Then 
      rtb_Event.Text = "Test" 
      rdp_Date.SelectedDate = "01/01/2001" 
      rtb_Email.Text = "[email protected]" 
      rtb_RespondingAT.Text = "Responding AT" 
     End If 
    End Sub 


    Protected Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click 
     Page.Validate() 
    End Sub 
End Class 

의 Web.config 내가 AutoPostBack을 = "진실을 제거하려고하는 것이 좋습니다 수 있습니다

<?xml version="1.0"?> 
<configuration> 
    <configSections> 
     <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
      <section name="BIR_Injuries.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> 
     </sectionGroup> 
    </configSections> 
    <connectionStrings> 
    <!--<add name="birinjury" providerName="System.Data.SqlClient" connectionString="Data Source=smcdevprtl01;Initial Catalog=BaylorInjuryForm_Dev;User ID=birinjury;Password=#password#;" />--> 
    <add name="birinjury" providerName="System.Data.SqlClient" connectionString="Data Source=10.9.5.111;Initial Catalog=BaylorInjuryForm;User ID=birinjury;Password=#password#;"/> 
    </connectionStrings> 
    <appSettings> 
     <add key="Telerik.Skin" value="WebBlue"/> 
     <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/> 
     <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/> 
     <add key="EmailFrom" value="[email protected]" /> 
     <add key="EmailCC" value="[email protected]" /> 
     <add key="EmailTo" value="[email protected]" /> 
     <add key="SMTPServer" value="172.23.0.71" /> 
    </appSettings> 
    <system.web> 
     <customErrors mode="Off"/> 
     <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"> 
     </compilation> 
     <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"> 
      <controls> 
       <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/> 
      </controls> 
     </pages> 
     <httpHandlers> 
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/> 
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/> 
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/> 
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/> 
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/> 
     </httpHandlers> 
     <httpModules> 
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/> 
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/> 
     </httpModules> 
     <httpRuntime maxRequestLength="5120" executionTimeout="120"/> 
    </system.web> 
    <system.webServer> 
     <validation validateIntegratedModeConfiguration="false"/> 
     <modules runAllManagedModulesForAllRequests="true"> 
      <remove name="RadUploadModule"/> 
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode"/> 
      <remove name="RadCompression"/> 
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode"/> 
     </modules> 
     <handlers> 
      <remove name="ChartImage_axd"/> 
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/> 
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/> 
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/> 
      <remove name="Telerik_Web_UI_DialogHandler_aspx"/> 
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/> 
      <remove name="Telerik_RadUploadProgressHandler_ashx"/> 
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/> 
      <remove name="Telerik_Web_UI_WebResource_axd"/> 
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/> 
     </handlers> 
     <security> 
      <requestFiltering> 
       <requestLimits maxAllowedContentLength="5242880"/> 
      </requestFiltering> 
     </security> 
    </system.webServer> 
</configuration> 

답변

0

두 개의 작은 것들 "버튼을 클릭하고 폼에 액션 속성을 지정합니다.

동작이 설정되어 있지 않거나 action = '#'으로 설정된 경우 IIS 6에 문제가 발생할 수 있으므로

관련 문제