none
Problema en servidor 1and1 - VB.Net - Paypalfunctions.vb - Checkoutstart.aspx RRS feed

  • Pregunta

  • Hola,

    Estoy intentando integrar Paypal en una pagina web de servicios varios. He utilizado el codigo que facilita Microsoft con su ejemplo de "WingTipToys".

    El error que obtengo:

    ERROR SUMMARY - HTTP Error 500.0 - Internal Server Error
    The page cannot be displayed because an internal server error has occurred.
    
    Detailed Error Information:
    Module	ManagedPipelineHandler
    Notification	ExecuteRequestHandler
    Handler	PageHandlerFactory-Integrated-4.0
    Error Code	0x00000000
    Requested URL	http://XXX.XXX.com:80/CheckoutStart.aspx
    Physical Path	E:\kunden\homepages\XX\XXX\www\XXX\CheckoutStart.aspx
    Logon Method	Anonymous
    Logon User	Anonymous
    Failed Request Tracing Log Directory	faultRequestLogPath
    
    Most likely causes:
    IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
    IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
    IIS was not able to process configuration for the Web site or application.
    The authenticated user does not have permission to use this DLL.
    The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.
    
    Things you can try:
    Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.
    Check the event logs to see if any additional information was logged.
    Verify the permissions for the DLL.
    Install the .NET Extensibility feature if the request is mapped to a managed handler.
    Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
    
    Links and More Information:
    This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.
    View more information »
    
    Microsoft Knowledge Base Articles:
    
    294807

    Cuando lo pruebo en mi ordenador personal, con Visual Studio 2013 en Windows 7, me funciona perfectamente, se comunica con Paypal, finaliza la compra, registro dicha compra en mi BD, todo perfecto. El problema viene cuando lo subo a mi servidor 1and1, con el Plan Hosting Windows. El único error que obtengo es el de la imagen. Lo mas que he podido conseguir comentando y descomentando linea por linea para saber en que momento justo saltaba el error, es que me falla en el siguiente código:

    La linea "problemática" :  Dim objResponse As HttpWebResponse = DirectCast(objRequest.GetResponse(), HttpWebResponse)

    La función entera:

    Public Function HttpCall(ByVal nvpRequest As String) As String
            Dim url As String = _pEndPointUrl
    
            Dim strPost As String = nvpRequest + "&" + BuildCredentialsNvpString()
            strPost = strPost + "&BUTTONSOURCE=" + HttpUtility.UrlEncode(BN_CODE)
    
            Dim objRequest As HttpWebRequest = DirectCast(WebRequest.Create(url), HttpWebRequest)
            objRequest.Timeout = TIMEOUT
            objRequest.Method = "POST"
            objRequest.ContentLength = strPost.Length
    
            Try
                Using myWriter As New StreamWriter(objRequest.GetRequestStream())
                    myWriter.Write(strPost)
                End Using
            Catch e As Exception
                ' Log the exception.
                'ExceptionUtility.LogException(e, "HttpCall in PayPalFunction.cs")
            End Try
    
            'Retrieve the Response returned from the NVP API call to PayPal.
            Dim objResponse As HttpWebResponse = DirectCast(objRequest.GetResponse(), HttpWebResponse)
            Dim result As String = ""
            Using sr As New StreamReader(objResponse.GetResponseStream())
                result = sr.ReadToEnd()
            End Using
    
            Return result
        End Function

    He escrito a los de 1and1 por si fuera un problema de bloqueo por seguridad en sus servidores, pero lo único que me responden es que el fallo es en el archivo CheckoutStart. 

    Así que ahora mismo estoy completamente estancado. Agradecería una ayuda de cualquier tipo, bien sea solucionandolo! :D o alguna manera de poder obtener un error mas detallado del problema.

    Repito, en local me funciona perfectamente, el problema me salta en el servidor.

    Si necesitan mas código para poder averiguar algo se lo facilitare gustosamente.

    Cabe decir también que he testado la pagina sin la integración de Paypal y también funciona perfectamente, con sus componentes ajax, su comunicación con BD, carrito de la compra con variables de session (sin pago, solo comunicación de reserva por mail).

    Gracias, y perdón por las molestias.

    viernes, 13 de marzo de 2015 12:39

Todas las respuestas