Results 1 to 9 of 9

Thread: Error while add web reference in app settings

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Thumbs up Error while add web reference in app settings

    Hi,

    I invoke web reference url in app settings that is,
    <appSettings>

    <add key="Aggregator" value="http://mob.i-waves.com/mDirectalpha/mDirectCPWebServiceV1/Aggregator.asmx"/>

    <!--<add key="Aggregator" value="http://localhost/mDirectCPWebServiceV1/Aggregator.asmx"/>-->
    </appSettings>

    Its working in localhost fine that is second url. But i put the in another server in the file, i got the below error.

    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.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.

    Give me a suggestion.How can rectify this exception.

    It's very urgent.Hope your's reply.

    Thanks & Regards
    Failing to plan is Planning to fail

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Error while add web reference in app settings

    Hey,

    If you take that URL and put it into a web browser, does it work?

    Gary

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Thumbs up Re: Error while add web reference in app settings

    I put the url and check it in my browser. It comes like the page cannot be found. I checked the directory in the server upto mob.i-waves.com/mdirectalpha/mDirectCPWebServiceV1 the directory found. After i clicked mob.i-waves.com/mdirectalpha/mDirectCPWebService1/Aggregator.asmx the page cannot be found.But i published the file and run it in local its working fine. i got the method name.But in server problem occured. Is any cross domain policy files need for this one? If yes, what will do for cross domain files?

    Thanks
    Failing to plan is Planning to fail

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Error while add web reference in app settings

    Hey,

    I am not sure that I fully understood your post. Can you perhaps try to break it down with exactly what you have done, and the problems that you are facing.

    Gary

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Thumbs up Re: Error while add web reference in app settings

    Ok i tell clearly.

    <add key="Aggregator" value="http://10.37.4.2/mDirectalpha/mDirectCPWebServiceV1/Aggregator.asmx"/>

    Aggregator objAggr = new Aggregator();
    protected void Page_Load(object sender, EventArgs e)
    {
    objAggr.Url = System.Configuration.ConfigurationManager.AppSettings["Aggregator"];
    DataSet da = new DataSet();
    da = objAggr.GetAggregatorDetails();

    string strResult = da.Tables[0].Rows[0][0].ToString();

    Response.Write(strResult);

    }

    I got the error in "The request failed with HTTP status 404: Not Found".

    But <add key="Aggregator" value="http://localhost/mDirectCPWebServiceV1/Aggregator.asmx"/> this url the above code is working fine.

    What is the problem? I need to know the solution that problem is in server side or in my code? If server side is problem what is the solutions? meanwhile for another.

    Thanks
    Failing to plan is Planning to fail

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Error while add web reference in app settings

    Hey,

    What is that IP Address?

    Is it your own server? Where are you trying to access it from? Is it publicly routable?

    Gary

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Thumbs up Re: Error while add web reference in app settings

    This Ip Address is my company mob server ip address. I am accessing it from my local system.
    Failing to plan is Planning to fail

  8. #8
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Error while add web reference in app settings

    Hey,

    Can you ping the IP Address? Do you get a response?

    The only reason that this wouldn't work is if the server isn't responding, or if the page you are looking for is not at the location you have asked for it at.

    I notice that there are other differences in the URL as well, was that intentional?

    Gary

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Error while add web reference in app settings

    Obviously, the problem is serverside, not your code.

    If you can't browse to http://10.37.4.2/mDirectalpha/mDirec...ggregator.asmx, then you need to fix that web application. Log on to 10.37.4.2, go to IIS, have a look at the web service setup there. Redeploy the ASMX and its corresponding files if you need to. Try browsing to http://10.37.4.2/mDirectalpha/mDirec...ggregator.asmx from the 10.37.4.2 machine itself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width