locked
The download of the specified resource has failed+SQLXML+Updategram+ExecuteNonQuery RRS feed

  • Question

  • User1593233503 posted

    Hi, I am using ExecuteNonQuery() whose command type is updategram. Mapping schema is present in a server. When ExecuteNonQuery statement is executed , I am getting an error -  HRESULT="0X80004005" Descritpion="The download of the specified resource has failed". Can someone please help me fix this issue?

    Here is the Code:

     Public Function ProcessUpdategram(ByVal Original As String, ByVal Current As String, _
            ByVal LOB As String, ByVal ConnectionConfigName As String, ByVal MapConfigName As String) As String
            Dim mapLoc As String
            Dim pQuote As String = (System.Configuration.ConfigurationManager.AppSettings(ConnectionConfigName))
            Dim cmd As SqlXmlCommand = New SqlXmlCommand(pQuote)
            Dim sReturn As String
    
            mapLoc = (System.Configuration.ConfigurationManager.AppSettings(LOB & MapConfigName))
            cmd.CommandText = "<ROOT xmlns:updg='urn:schemas-microsoft-com:xml-updategram'><updg:sync mapping-schema='" & mapLoc & "'><updg:before> "
            cmd.CommandText = cmd.CommandText & Original & "</updg:before><updg:after>" & Current
            cmd.CommandText = cmd.CommandText & "</updg:after></updg:sync></ROOT>"
            cmd.CommandType = SqlXmlCommandType.UpdateGram
            Try
                cmd.ExecuteNonQuery()
                sReturn = "<Success />"
                cmd = Nothing
            Catch ex As Exception
                cmd = Nothing
                Throw New Exception("ProcessUpdateGram:" & ex.Message)
            End Try
    
            Return sReturn
        End Function

    Thanks,

    Mahantesh

    Friday, August 8, 2014 3:20 PM

Answers

  • User1593233503 posted

    Hi Donald,

    This isssue is partially solved. I had this issue when;

    1.  I was running the code from a virtual machine and

    2. when the code was deployed to a web server. 

    In both the cases the application could not download the map schema which was present in some other server.  When I kept the map schema in any local folder, it would work.

    We could solve the issue with the web server hosted version by setting the "Load User Profile" to True under the Advanced Setting of the Application pool the app is runnign under.

    Please let me know if it solves your issue or you need any other info.

    Thanks,

    Mahantesh

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 1, 2015 9:12 AM

All replies

  • User465171450 posted

    Is your mapping-schema a url or file that is reachable from the sql server?

    Friday, August 8, 2014 3:46 PM
  • User1593233503 posted

    Hi Markfitzme - Thanks for the reply. Can you please let me know how do I check whether file is reachable from sql server?

    I am able to see that schema file when I hit that url from a browser. Also, I am facing this issue only when I run it from a particular machine i.e., I am getting this issue only when  I connect to virtual machine through VPN and running the code from that VM.

    Thanks,

    Mahantesh

    Saturday, August 9, 2014 1:12 AM
  • User996604603 posted

    Hi Mahantesh,

    Did you find a solution to this problem.?

    I am having exactly the same problem when I try to run SQLXML in Azure on a virtual machine (Cloud Service).

    Thanks,

    Donald

    Tuesday, September 1, 2015 8:08 AM
  • User1593233503 posted

    Hi Donald,

    This isssue is partially solved. I had this issue when;

    1.  I was running the code from a virtual machine and

    2. when the code was deployed to a web server. 

    In both the cases the application could not download the map schema which was present in some other server.  When I kept the map schema in any local folder, it would work.

    We could solve the issue with the web server hosted version by setting the "Load User Profile" to True under the Advanced Setting of the Application pool the app is runnign under.

    Please let me know if it solves your issue or you need any other info.

    Thanks,

    Mahantesh

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 1, 2015 9:12 AM
  • User996604603 posted

    Wow, Mahantesh!  Thank you so much.

    I changed the application pool advanced setting "Load User Profile" to True and it worked perfectly.

    Now I have to figure out why I had set it to "False" to see if I have caused any other problems by setting it to "True".

    I had tired bringing the W3C XML Schema XSD into my application, but it has such a big chain of references to other W3C files that I thought the likelihood of that working was small.

    If setting "Load User Profile" to True has side effects that I can't live with, I may have to fall back onto bringing all the W3C referenced files into my application.

    Thank you so much for this answer,

    Donald

    Tuesday, September 1, 2015 9:39 AM
  • User1593233503 posted

    Donald - I am glad, my answer helped you !

    Tuesday, September 1, 2015 11:21 AM