Respondido Publicar WEBSERVICE

  • segunda-feira, 24 de julho de 2006 11:18
     
     

    Bom dia,

    Estou tendo problema em publicar WEBSERVICE. Na maquina de desenvolvimento funciona corretamente.

    Mas quando publico no servidor ocorre o seguinte erro:

    P.S.: Já alterei o customErrors para ON, OFF e REMOTEONLY.

              E preciso alterar o endereço da URL ? Como faço caso seja isto ?

    Alan

     

    Runtime Error

    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="Off"/>
        </system.web>
    </configuration>

    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    
    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>

Todas as Respostas

  • segunda-feira, 24 de julho de 2006 13:32
     
     

    Olá Genomax. Como vai?

     

    Esta acontecendo algum erro no seu webservice e ele esta caindo no tratamento padrão do Asp.Net q é mostrar essa mensagem de erro amarela...

    Para mais detalhes do erro, você deve alterar o arquivo web.config do webservice, setando a propriedade customErrors mode="Off" (tem de ser exatamente assim, esse campo é Case Sensitive.)

    Se ainda assim não estiver funcionando por algum motivo, você pode descobrir de outra forma qual erro esta acontecendo.. gravando a mensagem de erro em um arquivo texto, por exemplo...

     

    Com essa informação não da para te ajudar muito, pois não tem detalhes do erro...

    Se depois de descobrir qual erro esta acontecendo você tiver dúvidas, não deixe de perguntar, ok?

     

    Abraços 

  • terça-feira, 25 de julho de 2006 13:59
     
     

    Bom dia  Guilherme ,

    Valeu pela dica. Mas mesmo assim estou com problema. Aparece o seguinte erro:

    Isto e devido a usuario do IIS ( USER: ASP.NET ) mas já coloquei ele como acesso total neste diretorio e continua ocorrendo o erro.

    Temo como gerar  o codigo TEMPORARY pelo FRAMEWORK ?

    Alan

     

    Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\testewebservice\f21ad38b\32e8ba0a" 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.UnauthorizedAccessException: Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\testewebservice\f21ad38b\32e8ba0a" is denied.

    ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

    To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

    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:

    [UnauthorizedAccessException: Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\testewebservice\f21ad38b\32e8ba0a" is denied.]
       System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
       System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +632
       System.IO.Directory.CreateDirectory(String path) +195
       System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(HttpContext context) +85
       System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(HttpContext context) +97
       System.Web.Compilation.PreservedAssemblyEntry.GetPreservedAssemblyEntry(HttpContext context, String virtualPath, Boolean fApplicationFile) +29
       System.Web.UI.TemplateParser.GetParserCacheItemFromPreservedCompilation() +91
       System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) +148
       System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() +125
       System.Web.UI.TemplateParser.GetParserCacheItem() +88
       System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser& parser) +171
       System.Web.HttpApplicationFactory.CompileApplication(HttpContext context) +43
       System.Web.HttpApplicationFactory.Init(HttpContext context) +485
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +170
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +414
    

  • terça-feira, 25 de julho de 2006 14:10
     
     Respondido

    Olá Genomax, tudo bom?

     

    Segundo esse artigo: http://support.microsoft.com/kb/823379

    O problema seria resolvido se voce rodar o comando aspnet_regiis -ir no console do visual studio...

     

    Encontrei mais gente com este problema em forums e o pessoal fala para checar se o usuario ASPNET tem permissao nessa pasta temporaria que aparece no erro..

    Ou então verificar se o processo do aspnet (aspnet_wp.exe ou w3wp.exe) esta rodando sobre um usuario que tem permissao nessa pasta.

     

    Não esqueça de voltar aqui para dizer se funcionou hehehe

    Abraços

  • terça-feira, 1 de agosto de 2006 12:22
     
     

    Ola  Guilherme ,

    Aqui tudo bom agora....heheheheh

    Funciou corretamente. Apenas reinstalei a versão do -ir pois pessoal do suporte havia atualizado o FRAMEWORK mas não havia registrado a nova versão.

    Valeu,

    Alan

  • terça-feira, 1 de agosto de 2006 12:28
     
     

    Olá Genomax!

    Que bom que funcionou... só não se esqueça de qualificar a postagem como útil para que outras pessoas possam tirar suas dúvidas sem ter de perguntar novamente.

     

    Grande abraço.