Re: The underlying connection was closed

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jason Brown [MSFT] (i-brjaso_at_online.microsoft.com)
Date: 03/21/05


Date: Mon, 21 Mar 2005 11:44:42 +1100

an app developed under .NET 1.0 won't run as expected under 1.1 - they're
too different for anything but simple code to port over with no changes.

-- 
Jason Brown
Microsoft GTSC, IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve Bugden" <SteveBugden@discussions.microsoft.com> wrote in message 
news:5CF92088-C20B-42FE-97F5-0879AC3EE42C@microsoft.com...
> Another point that I have just become aware of is that the ISP runs apps
> under IIS v6 and I have IIS v5.1 installed on my development server.
>
> Will applications written in a .Net framework 1.0, IIS 5.1 environment run
> under .net framework 1.1, IIS v6?
>
> THe only other possibly related symptom is that file privileges have been
> changing. THe ISP puts it down to using FTP when Frontpage server 
> extensions
> are installed. But files in directories unrelated to frontpage have also
> changed. I should emphasize at this point that I only have a shared server
> when I can copy my asp.net files and create a bin directory for my 
> components.
>
> Any pointers, hints, tips very gratefully received.
>
> Steve.
>
> "Steve Bugden" wrote:
>
>> Hi,
>>
>> I am trying to use a web service on an ISPs shared server and keep 
>> getting
>> the
>> following message:
>>
>> "The underlying connection was closed: Unable to connect to the remote 
>> server"
>>
>> Fortunately (so I thought), looking on the web
>> (http://p2p.wrox.com/topic.asp?TOPIC_ID=4858 for example), this seems to 
>> be a
>> known problem and the solution apparently is to add the following code to 
>> the
>> reference.cs
>>
>> protected override WebRequest GetWebRequest(Uri uri)
>>         {
>>             HttpWebRequest webRequest = (HttpWebRequest)
>> base.GetWebRequest(uri);
>>             webRequest.KeepAlive = true;
>>             return webRequest;
>>         }
>>
>> I have converted this to vb as follows:
>>
>>         Protected Overrides Function GetWebRequest(ByVal Uri As Uri) As
>> WebRequest
>>
>>             Dim webRequest As HttpWebRequest =
>> CType(MyBase.GetWebRequest(Uri), HttpWebRequest)
>>
>>             webRequest.KeepAlive = True
>>             Return webRequest
>>
>>         End Function
>>
>> An import of  system.net is also required.
>>
>> I put this in the reference.vb file accessible from the web references
>> section of a  dll which runs on the client. THis didn't have any effect.
>>
>> The ISP tells me that my application is breaking the application pool. I 
>> am
>> now getting an "Service unavailable" message, I
>> assume IIS has shut down applications since it has continually broken the
>> App pool.
>>
>> I have developed the application using visual studio 2002 and therefore 
>> it
>> uses the .net framework 1.0 and the ISP has it running under 1.1. Is this 
>> a
>> likely cause or should the a 1.0 application run under 1.1 OK?
>>
>> Could someone please give me some suggestions.
>>
>> Steve. 


Relevant Pages

  • Re: IIS 5.1 XP PRO HELP PLEASEEEEE
    ... I meant that the dyndns kept my router updated with the newly assigned ... about the routing of a domain to the server at all. ... If I have a domain name and a static ip address do I need to install IIS ... How do I find out if my ISP is behind a NAT and if they are how do you get ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: Problems with IIS 6.0 and downloading images.
    ... Try running "PerfMon" -- IIS has counters for this sort of information. ... within time limit" conflict with each other. ... processing is done on the server other than network IO -- which should not ... the website is in it's own app pool with default settings. ...
    (microsoft.public.inetserver.iis)
  • Re: .NET 2.0 Master Pages problem
    ... That's only true for IIS 6.0, which only comes with Windows 2003 Server. ... IIS can only run one version of ASP.NET at a time in each app pool. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: IIS 5.1 XP PRO HELP PLEASEEEEE
    ... I meant that the dyndns kept my router updated with the newly assigned ... the routing of a domain to the server at all. ... If I have a domain name and a static ip address do I need to install IIS as ... How do I find out if my ISP is behind a NAT and if they are how do you get ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: redirection on IIS
    ... >>a part of the first site, and when I talked to my ISP he ... >>said we have to redirect it on our IIS. ... >>DNS so both sites point to our web server IP Address) ... I dont want to run multiple web sites on a single IP ...
    (microsoft.public.inetserver.iis)