web services/winforms - 404 not found HELP!

Posted on 2007-09-27
Last Modified: 2012-08-13
I have created a simple c# winforms application that attaches to a webservice and makes a simple function call. All works fine on my local pc, however when I run the same application off of another XP machine on a shared drive I get "The request failed with HTTP Status 404: Not Found."?

It works find and prints out the message box on the local machine, is there something that I need to do in order for the other XP machine to use the application?

Question by:pjjc
    LVL 21

    Expert Comment

    Have you changed the address of the webservice? Previously the win app might have been sending a reuqest to localhost, it should now point to the machine name.

    Author Comment

    The web service is on the shares computer, which is the HOST (as I am using vmware to simulate another pc). VMWare is the pc that is accessing the HOSTS computer share which has the webservice on it. Where would I change it to reflect any ip change - would this be the problem?
    LVL 21

    Expert Comment

    Check the app.config file and change what might be localhost to the actual machine name of the machine hosting the web service.

    If you are using a Virtual computer then that computer may not be able to access the host computer until you enable networking in the VM ware settings.

    I think Only if you do these two things you should be able to get a response from a webservice on ur computer when you are trying to access it from a Virual computer

    Author Comment

    I Changed the web.config file line that says:             <sessionState mode="InProc" stateConnectionString="tcpip=" sqlConnectionString="data source=;Trusted_Connection=yes" cookieless="false" timeout="20"/>

    to actually specify:             <sessionState mode="InProc" stateConnectionString="tcpip=PCLaptop2:42424" sqlConnectionString="data source=PCLaptop2;Trusted_Connection=yes" cookieless="false" timeout="20"/>

    I also changed the web reference to point to the exact machine name PCLAPTOP2, and this works if I copy the exe file local to the Virutal machine (it connects to the HOST and uses the webservice), however if I try and run it off of the share it comes up with a problem of : request for the permission of type 'System.Net.WebPermission...' failed error.

    ANY CLUE what I can do?

    LVL 21

    Accepted Solution

    If you try running an application from a share there would be security exceptions. You might want to lossen up the security. Here is a link about how to do it
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now