Click here to Skip to main content
15,861,168 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Got an exception: The remote server returned an error: NotFound when I debugged my SL project. The related code is below:
C#
<pre lang="c#">
        private void Application_Startup(object sender, StartupEventArgs e) {
            Uri uri = new Uri(GetURL() + "/config.xml", UriKind.Absolute);
            //Use WebClient to download config.xml and read asynchronously.
            WebClient Appclient = new WebClient();
            Appclient.OpenReadAsync(uri);
            Appclient.OpenReadCompleted += new OpenReadCompletedEventHandler(Appclient_OpenReadCompleted);

        void Appclient_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)   {
            Stream stream = e.Result;  // throws an exception here
            ...
        }

where uri = http://localhost/57878/config.xml.
I don't know how to find/determine the problem? Thanks if you can help.
Posted
Updated 27-Aug-14 3:37am
v5
Comments
[no name] 27-Aug-14 9:09am    
If you were to pretend for moment that you did not know anything at all about your project, your code, could not read your mind or see your computer screen, then imagine for a moment that you came along and read what you wrote here. Could you answer this?

Find out what you are trying to access that is "NotFound" and point your code at the real location or move the thing that can't be found to where it's supposed to be.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900