uploadify和活动目录

时间:2012-01-26 16:12:47

标签: asp.net active-directory uploadify

我的任务是启用一个对话框,允许用户选择多个文件并立即上传。我选择了uploadify并让它与表单身份验证一起使用。当我启用活动目录时,除IE9外,所有浏览器都会失败/挂起。几周之后,我们确定最快的方法是将代码分成另一个站点并从我们的第一个站点调用它(丑陋,我知道,但我们需要将它传递给客户端,所以......)。

我创建了一个新网站并在那里复制了这些功能。每当我直接进入(没有先进入AD网站),它的工作没有问题。如果我然后登录到AD站点并返回上传页面,则请求到达且没有文件到服务器。

以下是相关的配置位:

web.config(AD网站)

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>
    <sectionGroup name="devExpress">
      <section name="settings" type="DevExpress.Web.ASPxClasses.SettingsConfigurationSection, DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
      <section name="compression" type="DevExpress.Web.ASPxClasses.CompressionConfigurationSection, DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
      <section name="themes" type="DevExpress.Web.ASPxClasses.ThemesConfigurationSection, DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
      <section name="errors" type="DevExpress.Web.ASPxClasses.ErrorsConfigurationSection, DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <connectionStrings>
    <add name="sae_codelcoConnectionString" connectionString="server=192.168.4.142\sql2008r2;uid=*******;pwd=*******;database=testing_codelco" providerName="System.Data.SqlClient" />
    <add name="saeConnectionString" connectionString="server=192.168.4.142\sql2008r2;uid=*******;pwd=*******;database=testing_codelco" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation debug="true" defaultLanguage="vb" maxBatchGeneratedFileSize="3000">
      <assemblies>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
    </compilation>
    <customErrors mode="Off" />
    <!--<authentication mode="Forms">
      <forms name="aspnet" path="/" loginUrl="logon.aspx" protection="All" timeout="30" />
    </authentication>-->
        <authentication mode="Windows"></authentication>
    <httpRuntime executionTimeout="100000" maxRequestLength="1234567" useFullyQualifiedRedirectUrl="false" requestLengthDiskThreshold="1234567" />
    <authorization>
      <allow users="?" />
    </authorization>
    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
    <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
    <globalization culture="es-CL" uiCulture="es" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" />
    <httpHandlers>
      <remove path="*.asmx" verb="*" />
      <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
        validate="false" />
      <add path="ajax/*.ashx" verb="POST,GET" type="Ajax.PageHandlerFactory, Ajax" />
      <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
        validate="false" />
      <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
        validate="false" />
      <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        validate="false" />
    </httpHandlers>
    <xhtmlConformance mode="Legacy" />
    <pages enableEventValidation="false" validateRequest="false">
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
          assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </controls>
    </pages>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
    </httpModules>
  </system.web>
    <location path="paginas/ordentrabajo/encuesta.aspx">
        <system.web>
            <authorization>
                <allow users="*" />
            </authorization>
        </system.web>
    </location>
    <location path="js/uploadify/uploadify.swf">
        <system.web>
            <authorization>
                <allow users="?" />
            </authorization>
        </system.web>
    </location>
  <location path="paginas/ordentrabajo/encuesta_response_html.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="paginas/resp_remotas/tickets_abiertos.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="no_acceso.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="paginas/resp_remotas/cerrar_tickets.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="paginas/ticket/logon_tareas.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="paginas/ticket/tarea_ticket.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="paginas/encDinamica/encDinamica_basica_respuesta_persona.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="paginas/encDinamica/encDinamica_basica_respuesta_persona_display.aspx">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
  <appSettings>
    <add key="PathLocalSitio" value="E:\data\Projects\mosaq\SAE_CODELCO\SAE_CODELCO\Sitio\" />
    <add key="pathDocsTicket" value="E:\data\Projects\mosaq\SAE_CODELCO\SAE_CODELCO\Sitio\Paginas\Docs\" />
    <add key="pathDocumentos" value="E:\data\Projects\mosaq\SAE_CODELCO\SAE_CODELCO\Sitio\Paginas\Documentos\Archivos\" />
      <add key="urlSubirDocs" value="http://192.168.4.155/subirdocs/default.aspx" />
    <add key="Factor Semaforo Verde" value="50" />
    <add key="Factor Semaforo Amarillo" value="75" />
    <add key="Factor Semaforo Naranja" value="100" />
    <add key="Factor Semaforo Rojo" value="150" />
    <add key="Factor Semaforo Morado" value="200" />
    <add key="Filtros Upload" value="exe,bat,dll,msi" />
    <add key="Filtros Upload Mail" value="gif,jpg,jpeg" />
    <add key="Server_Smtp" value="choclio.mosaq.com" />
    <add key="Server_Smtp_Autenticar" value="1" />
    <add key="Server_Smtp_Login" value="wquiroz" />
    <add key="Server_Smtp_Password" value="rmQgGN34" />
    <add key="from_mail" value="ialvarez@mosaq.com" />
    <add key="DictionaryFolder" value="Paginas\NetSpell\dic" />
    <add key="pathDocsAnalisisIPC" value="E:\data\Projects\mosaq\SAE_CODELCO\SAE_CODELCO\Sitio\documentos\AnalisisIPC\" />
    <add key="pathDocsMailsCRM" value="E:\data\Projects\mosaq\SAE_CODELCO\SAE_CODELCO\Sitio\CRM\AdjuntosMails\" />
    <add key="Mail Supervisor Mesa" value="adminsae@desarrollo_sae.org" />
    <add key="Mail Administrador Contrato" value="adminsae@desarrollo_sae.org" />
    <add key="HostVariable" value="1" />
    <add key="Url_Sitio_Externo" value="http://192.168.4.144/sae_codelco/" />
    <add key="Url_Sitio" value="http://192.168.4.155/sae_codelco/" />
    <add key="ipExterna" value="200.27.57.180" />
    <add key="ActiveDirectoryLogon" value="1" />
    <add key="strDomain" value="MOSAQ" />
    <add key="pathLDAP" value="LDAP://mosaq.local.cl/DC=mosaq,dc=local,dc=cl" />
    <add key="PathMapaSitioDisco" value="E:\data\Projects\mosaq\SAE_CODELCO\SAE_CODELCO\Sitio\imagenes\mapas\" />
    <add key="PathMapaSitios" value="../../imagenes/mapas/" />
    <add key="IPReportes" value="200.27.164.74/ReportServer$CODELCO/Pages/ReportViewer.aspx?/reportes_codelco/" />
    <add key="EspecialidadEjecutivosCRM" value="14" />
    <add key="HabilitaGenerica1Ticket" value="0" />
    <add key="Evento Retiro Componente" value="11169" />
    <add key="Evento Entrega Componente" value="11170" />
    <add key="Evento Actualizacion Componente" value="11171" />
    <add key="MisTicketsMuestraTpoRemanenteInferior" value="0" />
    <add key="MisTicketsMuestraTpoRemanenteSuperior" value="0" />
    <add key="MisTicketsMuestraCriticidad" value="0" />
    <add key="Agregar_Solucion_En_Solucion_En_Linea" value="1" />
    <add key="Id_menu_Tickets_Generales" value="132" />
    <add key="Ver_Todas_las_Criticidades" value="1" />
    <add key="Evento_Limpia_Password_Intranet" value="506" />
    <add key="Solucion_Limpia_Password_Intranet" value="128" />
    <add key="Template" value="default" />
    <add key="RptCalidadVerCumpleSup" value="0" />
    <add key="ObsEsperaClienteTicket" value="0" />
    <add key="idCatGeneralDocs" value="0" />
    <add key="pathCMDBModelos" value="E:\data\Projects\mosaq\SAE_CODELCO\SAE_CODELCO\Sitio\CMDB\" />
    <add key="pathDocsInst" value="E:\data\Projects\mosaq\SAE_CODELCO\SAE_CODELCO\Sitio\Instalaciones_ci\Docs\" />
    <add key="IdCriticidadPersonaNormal" value="1" />
    <add key="BusquedaIniIngresoOT" value="0" />
    <add key="VerResueltosListaPend" value="1" />
    <add key="UrlSitioProyectos" value="http://192.168.4.155/sae_codelco/" />
    <add key="CierreOT" value="1" />
    <add key="IPExternoReportes" value="200.27.57.180:8080" />
    <add key="pathDocumentosProyectos" value="" />
    <add key="IngresaNegocioEnOT" value="0" />
    <add key="BloquearModificayELiminaNotas" value="1" />
    <add key="IncluirCodigoenLabelRut" value="0" />
    <add key="MisTicketsMuestraComponentes" value="0" />
    <add key="MisTicketsMuestraRegion" value="1" />
    <add key="encuestaDinamicaBasica" value="0" />
    <add key="encuestaDinamicaAvanzada" value="0" />
    <add key="AdmiteCreacionPersonas" value="1" />
    <add key="AdmiteCreacionPersonasIdEmpresas" value="" />
    <add key="IdMedioAtencionTareaAgenda" value="4" />
    <add key="IdEncuestaReclamoTarea" value="2" />
    <add key="IdEncuestaFelicitacionesTarea" value="1" />
    <add key="IdEncuestaReclamoProceso" value="0" />
    <add key="IdEncuestaFelicitacionesProceso" value="0" />
    <add key="ResolverPorEmail" value="0" />
    <add key="idEvtoReposAlta" value="1" />
    <add key="idEvtoReposBaja" value="2" />
    <add key="EmpresasRecatalogar" value="2,3,4,5" />
    <add key="UtilizaCorrecionFechaComprometida" value="0" />
    <add key="ModCriticidadEnOT" value="1" />
    <add key="UsaReglaFechasAmsa" value="0" />
    <add key="AtentoMisTicketsResaltaMasivo" value="1" />
    <add key="Cliente" value="Atento" />
    <add key="LlamadaRapidaN1N2N3" value="3,10,Consulta" />
    <add key="LlamadaRapidaIDEvento" value="11392" />
    <add key="urlSitioNoticias" value="http://www.saedemo.cl/noticias/default.aspx?rawHsh=" />
    <add key="solicIdEstado" value="1" />
    <add key="IdMedioAtencionSolContacto" value="5" />
    <add key="solicIdTipo" value="3" />
    <add key="idGenericoSolicitantePGFensaMademsa" value="1" />
    <add key="IDTGenjunaeb" value="221" />
    <add key="IDTGenmademsa" value="220" />
    <add key="IDTGenfensa" value="219" />
    <add key="SearchByDescriptionInActive" value="0" />
    <add key="SearchActiveUserName" value="Prueba" />
    <add key="SearchActiveUserPassword" value="12345678" />
    <add key="junaeb" value="0" />
    <add key="gruposCAS" value="1" />
    <add key="bpm2009" value="0" />
    <add key="url_bpm2009" value="http://ignacio-pc/websaeprocesos2009/paginas/ticket_proceso.aspx" />
    <add key="SaeV2MDB.WSProcesos2009.WsInstansiaProceso" value="http://ignacio-pc/WSSAEProcesos2009/WsInstansiaProceso.asmx" />
    <add key="urlReporteContratosPagos" value="http://192.168.4.73/ReportServer$CODELCO/Pages/ReportViewer.aspx?%2freportes_codelco%2fEstado_de_pago" />
    <add key="url_rfc" value="http://192.168.4.155/sae_codelco_rfc/default.aspx" />
    <add key="IdMedioAtencionDefectoOT" value="2" />
    <add key="IdTipoCatalogoDefectoOT" value="1" />
    <add key="Proveedores" value="8=Grupo Mesa;15=Grupo Operaciones" />
    <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
  </appSettings>
  <system.codedom>
    <compilers>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
        <providerOption name="CompilerVersion" value="v3.5" />
        <providerOption name="OptionInfer" value="true" />
        <providerOption name="WarnAsError" value="false" />
      </compiler>
    </compilers>
  </system.codedom>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <remove name="ScriptModule" />
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
        name="ASPxHttpHandlerModule" />
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="ScriptHandlerFactory" />
      <remove name="ScriptHandlerFactoryAppServices" />
      <remove name="ScriptResource" />
      <remove name="ChartImageHandler" />
      <add name="ajax/*.ashx_POST,GET" path="ajax/*.ashx" verb="POST,GET"
        type="Ajax.PageHandlerFactory, Ajax" preCondition="integratedMode,runtimeVersionv2.0" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
        type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd"
        preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd"
        preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add type="DevExpress.Web.ASPxUploadControl.ASPxUploadProgressHttpHandler, DevExpress.Web.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
        verb="GET,POST" path="ASPxUploadProgressHandlerPage.ashx" name="ASPxUploadProgressHandler"
        preCondition="integratedMode" />
      <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
        path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </handlers>
  </system.webServer>
  <runtime>
    <assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <devExpress>
    <settings rightToLeft="false" />
    <compression enableHtmlCompression="false" enableCallbackCompression="true" enableResourceCompression="true" enableResourceMerging="false" />
    <themes enableThemesAssembly="true" />
    <errors callbackErrorRedirectUrl="" />
  </devExpress>
</configuration>

global.asax(AD网站)

Imports saeFrameWork
Imports SaeConnectorV1
Imports System.Web
Imports System.Web.SessionState

Public Class [Global]

    Inherits System.Web.HttpApplication

#Region " Component Designer Generated Code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Component Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Required by the Component Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Component Designer
    'It can be modified using the Component Designer.
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        components = New System.ComponentModel.Container()
    End Sub

#End Region

    Dim PathLocalArchivoConfiguracion As String = ConfigurationManager.AppSettings("PathLocalSitio")

    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when the application is started
    End Sub

    Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
        Dim host As String = Request.ServerVariables("server_name")
        If Convert.ToBoolean(Convert.ToInt32(ConfigurationManager.AppSettings("HostVariable"))) Then
            Dim i As Integer = 0
            Dim ipExterna As Array = Split(ConfigurationManager.AppSettings("ipExterna"), ",")
            Dim ipExternaReportes As Array = Split(ConfigurationManager.AppSettings("IPExternoReportes"), ",")
            Dim UrlSitiosExternos As Array = Split(ConfigurationManager.AppSettings("Url_Sitio_Externo"), ",")
            For i = 0 To UBound(ipExterna)
                If ipExterna(i) = host Then
                    Session("Url_Sitio") = UrlSitiosExternos(i)
                    Session("IPReportesBirt") = ipExternaReportes(i)
                    Exit For
                Else
                    Session("Url_Sitio") = ConfigurationManager.AppSettings("Url_Sitio")
                    Session("IPReportesBirt") = ConfigurationManager.AppSettings("IPReportes")
                End If
            Next
            'If ipExterna = host Then
            '    Session("Url_Sitio") = ConfigurationManager.AppSettings("Url_Sitio_Externo")
            '    Session("IPReportesBirt") = ConfigurationManager.AppSettings("IPExternoReportes")
            'Else
            '    Session("Url_Sitio") = ConfigurationManager.AppSettings("Url_Sitio")
            '    Session("IPReportesBirt") = ConfigurationManager.AppSettings("IPReportes")
            'End If
        Else
            Session("Url_Sitio") = ConfigurationManager.AppSettings("Url_Sitio")
            Session("IPReportesBirt") = ConfigurationManager.AppSettings("IPReportes")
        End If
        Session("template") = ConfigurationManager.AppSettings("Template")
        Session("call") = Nothing
        ' Fires when the session is started
        'Dim oDbCliente As New DbCliente
        'Try
        '    Dim sql As String = ""
        '    Dim dsMA As DataSet
        '    Dim dsNivel1 As DataSet
        '    Dim fwkCfgFile As saeFwk_ConfigFileSettings
        '    Dim dbtype As String = ""
        '    Dim PathLocalArchivoConfiguracion As String = ConfigurationManager.AppSettings("PathLocalSitio")
        '    fwkCfgFile = New saeFwk_ConfigFileSettings 'instancia clase de lectura de archivo de configuracion
        '    dbtype = fwkCfgFile.returnKeyValue(PathLocalArchivoConfiguracion, "dbtype")    'dimensionamos variable que toma el tipo de base de datos que utilizaremos
        '    sql = "SELECT    id,nombre "
        '    sql &= "FROM medios_atencion_ticket "
        '    sql &= "order by nombre"
        '    oDbCliente = New DbCliente(PathLocalArchivoConfiguracion, sql, dbtype)
        '    dsMA = DBMapping.getDataSet(oDbCliente, dbtype)
        '    Session("mediosAtencion") = dsMA
        '    dsMA = Nothing
        '    sql = "select id,nombre from nivel_1 order by nombre"
        '    DBMapping.changeCommandText(oDbCliente, dbtype, sql)
        '    dsNivel1 = DBMapping.getDataSet(oDbCliente, dbtype)
        '    Session("nivel1") = dsNivel1
        '    dsNivel1 = Nothing
        'Catch ex As Exception
        '    Response.Write("Ha ocurrido el siguiente error al iniciar la session: " & ex.Message & "<br><br>Favor contacte al prooveedor.")
        'Finally
        '    oDbCliente.Close()
        '    oDbCliente.Dispose()
        'End Try
    End Sub

    Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires at the beginning of each request
    End Sub

    Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires upon attempting to authenticate the use
    End Sub

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when an error occurs
    End Sub

    Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)

        Dim oUser As saefwk_ValidaUsuario = Session("oUser")

        Dim oLogLogInOut As New saeFwk_LogLogInOut
        oLogLogInOut.login = oUser.Login
        oLogLogInOut.resolutor_id = oUser.Id
        oLogLogInOut.fecha = DateTime.Now
        oLogLogInOut.tipo = "O"
        oLogLogInOut.guardar(PathLocalArchivoConfiguracion)

        Try
            Dim rutas() As String = IO.Directory.GetFiles(ConfigurationManager.AppSettings("pathDocumentos"), "temp_" & Session.SessionID & "*.*")
            For Each ruta As String In rutas
                IO.File.Delete(ruta)
            Next
        Catch

        End Try

        Session.RemoveAll()
        ' Fires when the session ends
    End Sub

    Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when the application ends
    End Sub

    Protected Overrides Sub Finalize()
        MyBase.Finalize()
    End Sub
End Class

所有Google搜索解决方案均在Windows 7计算机,2008 r2计算机(IIS 7.5),2008计算机(IIS 7)和2003计算机(IIS 6)上进行了测试。当我开始时,我怀疑应用程序会给我们带来麻烦,现在我确信该应用程序有些东西搞砸了我们提出的上传实现,因此该网站的web.config和glbal.asax。如果您还需要其他信息,请告诉我

PS:我也尝试包含上传网站位,但帖子很长。它们是使用request.files获取文件的aspify在asp.net上的标准实现。 web.config是使用new vs 2010站点创建的默认值。

0 个答案:

没有答案