Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Saturday, March 31, 2012

system.enterpriseservices.dll error

I am running a web app on w2k3/IIS 6.0/ASP.net 2.0. This app runs fine on a different server. The error message I get is

Compiler Error Message:CS0006: Metadata file 'C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll' could not be found

I have seen solutions to remove the "<identity impersonate="true" />" setting from the web.config file. That has not been helpful. Another solution was to delete the system.enterpriseservices.dll from C:\Windows\assembly. I have deleted the file, copied a new .dll, and that did not work. I have reinstalled IIS and ASP.Net 2.0 as well. So far, no dice. Any other ideas are greatly welcomed!


AJ

Hello AJ,

This may be a dumb question, but is the assembly in the GAC on the deployment server? If it isn't, you should be able to add it by running "gacutil /if System.EnterpriseServices.dll" using the 2.0 version of gacutil.exe.

HTH,
Clay


Clay,

Thanks for the response. I just got the problem figured out today.

The file permissions were screwed up. Users did not have read and execute permissions to this folder:
C:\WINDOWS\WinSxS\x86_System.EnterpriseServices_b03f5f7f11d50a3a_2.0.0.0_x-ww_7d5f3790

After I fixed that I got a similar error message as before but it mentioned a system.enterpriseServices.Wrapper.dll and found out that this file was missing
C:\WINDOWS\WinSxS\x86_System.EnterpriseServices_b03f5f7f11d50a3a_2.0.0.0_x-ww_7d5f3790\System.EnterpriseServices.Wrapper.dll

Now it is running like a champ!

AJ

System.ExecutionEngineException problem

I have a stable app developed on ASP.NET 1.1 that I'm porting to 2.0.
However, I've noticed that on one page, if I click a button to perform some
business logic (which runs fine), then click on a hyperlink to move to a
different page, I get a 'System.ExecutionEngineException' exception. There
is no line highlighted in the debugger.
I'm not using interop or other threads.
Event viewer shows:
.NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3)
(80131506)
I also sometimes see:
aspnet_wp.exe (PID: 2324) stopped unexpectedly.
It fails predictably on the dev web server in VS2005, less regularly on IIS
(although it does still fail).
I've tried to create a simplified program to reproduce the problem - so far
without success. However I did notice that the problem was worsened by some
code returning an array (15-20) of small Dictionary<> objects. I added a
conversion routine to turn them into arrays of structs, and some of the
problems went away. Is this something to do with memory-shortage' My PC has
800mb, with around 80mb free when running the code.
Whats going on? Is this a bug in .NET2, or is there something stupid in my
code? Advice would be welcome!!
XP Pro sp2, .NET 2.0.50727.42, VS2005, SQL2005
Thanks,
JohnI've reported this to Microsoft, and they can reproduce the problem. I'll
post an update when I know more.
John
"John" <jsparrowNOSPAM@.ecclesdeletethiscollege.ac.uk> wrote in message
news:OAQ9HMLPGHA.812@.TK2MSFTNGP10.phx.gbl...
>I have a stable app developed on ASP.NET 1.1 that I'm porting to 2.0.
> However, I've noticed that on one page, if I click a button to perform
> some business logic (which runs fine), then click on a hyperlink to move
> to a different page, I get a 'System.ExecutionEngineException' exception.
> There is no line highlighted in the debugger.
Microsoft report the problems stems back to a Dictionary<decimal,double>
instance.
Looks like the CLR can't cope with this for some reason. Be afraid....
John
"John" <jsparrowNOSPAM@.ecclesdeletethiscollege.ac.uk> wrote in message
news:e2h74swPGHA.5296@.TK2MSFTNGP09.phx.gbl...

System.ExecutionEngineException problem

I have a stable app developed on ASP.NET 1.1 that I'm porting to 2.0.

However, I've noticed that on one page, if I click a button to perform some
business logic (which runs fine), then click on a hyperlink to move to a
different page, I get a 'System.ExecutionEngineException' exception. There
is no line highlighted in the debugger.

I'm not using interop or other threads.

Event viewer shows:

..NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3)
(80131506)

I also sometimes see:

aspnet_wp.exe (PID: 2324) stopped unexpectedly.

It fails predictably on the dev web server in VS2005, less regularly on IIS
(although it does still fail).

I've tried to create a simplified program to reproduce the problem - so far
without success. However I did notice that the problem was worsened by some
code returning an array (15-20) of small Dictionary<> objects. I added a
conversion routine to turn them into arrays of structs, and some of the
problems went away. Is this something to do with memory-shortage?? My PC has
800mb, with around 80mb free when running the code.

Whats going on? Is this a bug in .NET2, or is there something stupid in my
code? Advice would be welcome!!

XP Pro sp2, .NET 2.0.50727.42, VS2005, SQL2005

Thanks,

JohnI've reported this to Microsoft, and they can reproduce the problem. I'll
post an update when I know more.

John

"John" <jsparrowNOSPAM@.ecclesdeletethiscollege.ac.uk> wrote in message
news:OAQ9HMLPGHA.812@.TK2MSFTNGP10.phx.gbl...
>I have a stable app developed on ASP.NET 1.1 that I'm porting to 2.0.
> However, I've noticed that on one page, if I click a button to perform
> some business logic (which runs fine), then click on a hyperlink to move
> to a different page, I get a 'System.ExecutionEngineException' exception.
> There is no line highlighted in the debugger.
Microsoft report the problems stems back to a Dictionary<decimal,double>
instance.

Looks like the CLR can't cope with this for some reason. Be afraid....

John

"John" <jsparrowNOSPAM@.ecclesdeletethiscollege.ac.uk> wrote in message
news:e2h74swPGHA.5296@.TK2MSFTNGP09.phx.gbl...

>> However, I've noticed that on one page, if I click a button to perform
>> some business logic (which runs fine), then click on a hyperlink to move
>> to a different page, I get a 'System.ExecutionEngineException' exception.
>> There is no line highlighted in the debugger.

Wednesday, March 28, 2012

System.Io.Directory.Delete

sometime when debuging my VS.NET 2005 app, when I call
System.IO.Directory.Delete does not work, but never throws an
exception. but when I try access that directory by going to windows
explorer, it gives me Access Exception, permissions denied.

it's when I close the VS.NET when the directory is actually deleted.
anyone knows why this would behave this way?

BTW, when I use FileSystemObject delete method, it works perfectly,
but I want to use .NET for all my sites projects.

thanks.Hello mr t (Please use your real name here)

Quote:

Originally Posted by

sometime when debuging my VS.NET 2005 app, when I call
System.IO.Directory.Delete does not work, but never throws an
exception. but when I try access that directory by going to windows
explorer, it gives me Access Exception, permissions denied.


Same Behavior in Release Mode?

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET

System.IO.FileNotFoundException help

Not sure where this error is coming from. I have my asp.net app set to email
me error messages, but this error message does not indicate where it occurs.
There is no page called get_aspx_ver.aspx and I don't know where it's
getting that. Any ideas?
System.IO.FileNotFoundException:
c:\inetpub\wwwroot\framescale\get_aspx_v
er.aspx
at System.Web.UI.TemplateParser.GetParserCacheItem()
at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String
requestType, String url, String path)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)"When you try to open an ASP.NET Web Application project, the ASP.NET
process accesses a nonexistent file that is named Get_aspx_ver.aspx to
retrieve the ASP.NET version information. If the defaultRedirect attribute
is not set to an HTML file or to an ASP file, the request for the
Get_aspx_ver.aspx file returns the HTTP 404 error and the ASP.NET version
information. If the defaultRedirect attribute is set to an HTML file or to
an ASP file, the request for the Get_aspx_ver.aspx file does not return the
ASP.NET version information. Therefore, you receive the error that is
mentioned in the "Symptoms" section of this article. "
http://support.microsoft.com/defaul...kb;en-us;825792
Also:
http://bluebones.net/news/default.a...ory&story_id=50
"msnews.microsoft.com" <maximus@.portvista.com> wrote in message
news:%23B6kthPSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> Not sure where this error is coming from. I have my asp.net app set to
> email
> me error messages, but this error message does not indicate where it
> occurs.
> There is no page called get_aspx_ver.aspx and I don't know where it's
> getting that. Any ideas?
> System.IO.FileNotFoundException:
> c:\inetpub\wwwroot\framescale\get_aspx_v
er.aspx
> at System.Web.UI.TemplateParser.GetParserCacheItem()
> at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String
> virtualPath, String inputFile, HttpContext context)
> at System.Web.UI.TemplateControlParser.GetCompiledInstance(String
> virtualPath, String inputFile, HttpContext context)
> at System.Web.UI.PageParser.GetCompiledPageInstanceInternal(String
> virtualPath, String inputFile, HttpContext context)
> at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String
> requestType, String url, String path)
> at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
> requestType, String path, String pathTranslated, Boolean useAppConfig)
>
Nice going Microsoft. I'd not being wearing that MVP badge so proudly! lol!
"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> wrote in message
news:e1ie4XQSEHA.568@.TK2MSFTNGP12.phx.gbl...
> "When you try to open an ASP.NET Web Application project, the ASP.NET
> process accesses a nonexistent file that is named Get_aspx_ver.aspx to
> retrieve the ASP.NET version information. If the defaultRedirect attribute
> is not set to an HTML file or to an ASP file, the request for the
> Get_aspx_ver.aspx file returns the HTTP 404 error and the ASP.NET version
> information. If the defaultRedirect attribute is set to an HTML file or to
> an ASP file, the request for the Get_aspx_ver.aspx file does not return
the
> ASP.NET version information. Therefore, you receive the error that is
> mentioned in the "Symptoms" section of this article. "

System.IO.FileNotFoundException help

Not sure where this error is coming from. I have my asp.net app set to email
me error messages, but this error message does not indicate where it occurs.
There is no page called get_aspx_ver.aspx and I don't know where it's
getting that. Any ideas?

System.IO.FileNotFoundException:
c:\inetpub\wwwroot\framescale\get_aspx_ver.aspx
at System.Web.UI.TemplateParser.GetParserCacheItem()
at System.Web.UI.TemplateControlParser.CompileAndGetP arserCacheItem(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.TemplateControlParser.GetCompiledIns tance(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String
virtualPath, String inputFile, HttpContext context)
at System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context, String
requestType, String url, String path)
at System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)"When you try to open an ASP.NET Web Application project, the ASP.NET
process accesses a nonexistent file that is named Get_aspx_ver.aspx to
retrieve the ASP.NET version information. If the defaultRedirect attribute
is not set to an HTML file or to an ASP file, the request for the
Get_aspx_ver.aspx file returns the HTTP 404 error and the ASP.NET version
information. If the defaultRedirect attribute is set to an HTML file or to
an ASP file, the request for the Get_aspx_ver.aspx file does not return the
ASP.NET version information. Therefore, you receive the error that is
mentioned in the "Symptoms" section of this article. "

http://support.microsoft.com/defaul...kb;en-us;825792

Also:

http://bluebones.net/news/default.a...ory&story_id=50

"msnews.microsoft.com" <maximus@.portvista.com> wrote in message
news:%23B6kthPSEHA.3944@.TK2MSFTNGP11.phx.gbl...
> Not sure where this error is coming from. I have my asp.net app set to
> email
> me error messages, but this error message does not indicate where it
> occurs.
> There is no page called get_aspx_ver.aspx and I don't know where it's
> getting that. Any ideas?
> System.IO.FileNotFoundException:
> c:\inetpub\wwwroot\framescale\get_aspx_ver.aspx
> at System.Web.UI.TemplateParser.GetParserCacheItem()
> at System.Web.UI.TemplateControlParser.CompileAndGetP arserCacheItem(String
> virtualPath, String inputFile, HttpContext context)
> at System.Web.UI.TemplateControlParser.GetCompiledIns tance(String
> virtualPath, String inputFile, HttpContext context)
> at System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String
> virtualPath, String inputFile, HttpContext context)
> at System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context, String
> requestType, String url, String path)
> at System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
> requestType, String path, String pathTranslated, Boolean useAppConfig)
Nice going Microsoft. I'd not being wearing that MVP badge so proudly! lol!

"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> wrote in message
news:e1ie4XQSEHA.568@.TK2MSFTNGP12.phx.gbl...
> "When you try to open an ASP.NET Web Application project, the ASP.NET
> process accesses a nonexistent file that is named Get_aspx_ver.aspx to
> retrieve the ASP.NET version information. If the defaultRedirect attribute
> is not set to an HTML file or to an ASP file, the request for the
> Get_aspx_ver.aspx file returns the HTTP 404 error and the ASP.NET version
> information. If the defaultRedirect attribute is set to an HTML file or to
> an ASP file, the request for the Get_aspx_ver.aspx file does not return
the
> ASP.NET version information. Therefore, you receive the error that is
> mentioned in the "Symptoms" section of this article. "

Monday, March 26, 2012

system.net.mail - email sending no longer working

Hi,

Previously on my web app I had a contact page that would send an email to me with all the filled in values from the user. The email would be sent with the FROM address the user put in, so when I received it I could reply back to them. I had this working for years, and now all of a sudden it errors out.

I get the following error. Please note I was using System.Net.Mail, but changed to a component to try and debug.

I'm wondering what would cause this error to happen suddenly? Perhaps a configuration change in IIS ? What would be a good work around to this ? Is it possible to maybe email from my own domain, but specify a different ReplyTo address?


Thanks,
mike123

Additional Help:452 4.2.2 Mailbox full
] Verify you can send email on behalf of'userFilledInName@dotnet.itags.org.hotmail.com' through the mail server 'domainName.com to'admin@dotnet.itags.org.domainName.com'. 'domainName.com' may not allow relaying for that specific address or domain, resulting with a 500 or larger error.Your server may also require a username and password for authentication, check with your mail server administrator. For additional information, enable logging by setting EmailMessage.Logging = true and if you have file write permission set a path for EmailMessage.LogPath, then check the log. If you are sending from an ASP.NET application and do not have file write access, wrap the EmailMessage.Send() in a Try..Catch() block and call Response.Write( EmailMessage.GetLog() ) from inside or after the Catch(). To ignore this error; set IgnoreRecipientErrors = true
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: aspNetEmail.SmtpProtocolException: [Additional Help:452 4.2.2 Mailbox full
] Verify you can send email on behalf of'userFilledInName@dotnet.itags.org.hotmail.com' through the mail server 'domainName.com to'admin@dotnet.itags.org.domainName.com'. 'domainName.com' may not allow relaying for that specific address or domain, resulting with a 500 or larger error.Your server may also require a username and password for authentication, check with your mail server administrator. For additional information, enable logging by setting EmailMessage.Logging = true and if you have file write permission set a path for EmailMessage.LogPath, then check the log. If you are sending from an ASP.NET application and do not have file write access, wrap the EmailMessage.Send() in a Try..Catch() block and call Response.Write( EmailMessage.GetLog() ) from inside or after the Catch(). To ignore this error; set IgnoreRecipientErrors = true

Source Error:


Line 200:
Line 201:
Line 202: msg.Send()
Line 203: msg = Nothing
Line 204:

Destination Full means exactly that. You're sending to an address where the mailbox will accept no more messages. You can't fix this, the problem is the recipient needs to read their mail and empty their mailbox.

Jeff


Hi Jeff,

Thanks for the lightning quick reply, but sorry I forgot to include this part. I have emptied the mail box, it is definately not full. Also to make sure it wasnt a server side mail problem I also tried sending to other email addresses that also were verified to not be full.

I was thinking it might have something to do with the relaying ? I can paste mail logs if that might help ?

Thanks again,
Mike123


anybody have any other thoughts on this ?

much appreciated

mike123

Saturday, March 24, 2012

System.Net.Sockets.SocketException: An established connection was aborted by the software

Hello, I got this error today in an Application. This app is coded in asp.net 2, using VB. I have the Andri Code (http://makoto.madmedia.ca/2007/03/mysql-membership-and-role-provider-for.html) to connect asp.net with mysql. It has never caused errors in the past, I have the same configuration on another app that has been running for several months with no problem.

This app is new (1 week) and today is the first day I see this error.

Any ideas?

Server Error in '/' Application.
------------------------

An established connection was aborted by the software in your host machine
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 established connection was aborted by the software in your host machine

Source Error:


Line 859:
Line 860:
Line 861: conn.Open();
Line 862: using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
Line 863: {

Source File: d:\appfolder\App_Code\CSCode\MySQLMembershipProvider.cs Line: 861

Stack Trace:


[SocketException (0x2745): An established connection was aborted by the software in your host machine]
System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +1019099
MySql.Data.Common.SocketStream.Write(Byte[] buffer, Int32 offset, Int32 count) +22
System.IO.BufferedStream.FlushWrite() +21
System.IO.BufferedStream.Flush() +26
MySql.Data.MySqlClient.MySqlStream.Flush() +119
MySql.Data.MySqlClient.NativeDriver.ExecuteCommand(DBCmd cmd, Byte[] bytes, Int32 length) +114
MySql.Data.MySqlClient.NativeDriver.SetDatabase(String dbName) +29
MySql.Data.MySqlClient.MySqlConnection.ChangeDatabase(String database) +68
MySql.Data.MySqlClient.MySqlConnection.Open() +323
Andri.Web.MySqlMembershipProvider.ValidateUser(String username, String password) in d:\appfolder\App_Code\CSCode\MySQLMembershipProvider.cs:861
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
System.Web.UI.WebControls.Login.AttemptLogin() +105
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +171
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.213

Do you have a firewall on your machine? This may be preventing your app from accessing MySQL via TCP/IP.

One other problem where I received this error was when I built a client/server app, and one machine had IPv6 protocol installed but the other machine had IPv4 (same domain/network). When I changed both to IPv4, it worked.


Hello, I have other apps with the same configuration running in the same machine so I think the firewall is not an option.

This is not a standalone app, it is a web app.


Hi vialetti,

I am afraid to say that it seems a bug said from MySql community. Here is link:http://bugs.mysql.com/bug.php?id=6634

Hope this helps. Thanks.

System.Net.WebException:

Hi,
I am trying to make a simple file updload WinForm app.
Here's the code:
WebClient webClient = new WebClient();
webClient.UploadFile(new Uri("http://localhost/WebSite/Upload.aspx"),
"c:\\bin.zip");

My IIS 5.1 Web server uses default configuration.
If the file is less than 5Mo everything works fine. If the file is too big I
get this exception:
System.Net.WebException: The underlying connection was closed: An unexpected
error occurred on a receive. --> System.IO.IOException: Unable to read data
from the transport connection: An existing connection was forcibly closed by
the remote host. --> System.Net.Sockets.SocketException: An existing
connection was forcibly closed by the remote host

I will never have to upload more than 30Mo.
Do you now how I can correct this issue ?In the web.config file, the httpRunTime element has a maxRequestLength which
restricts the length in bytes of any HTTP request. The default is 4MB.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"zolof" <zolof@.discussions.microsoft.com> wrote in message
news:C12D293F-C3B4-401C-99A6-7A10DB48B8BE@.microsoft.com...
> Hi,
> I am trying to make a simple file updload WinForm app.
> Here's the code:
> WebClient webClient = new WebClient();
> webClient.UploadFile(new Uri("http://localhost/WebSite/Upload.aspx"),
> "c:\\bin.zip");
> My IIS 5.1 Web server uses default configuration.
> If the file is less than 5Mo everything works fine. If the file is too big
> I
> get this exception:
> System.Net.WebException: The underlying connection was closed: An
> unexpected
> error occurred on a receive. --> System.IO.IOException: Unable to read
> data
> from the transport connection: An existing connection was forcibly closed
> by
> the remote host. --> System.Net.Sockets.SocketException: An existing
> connection was forcibly closed by the remote host
> I will never have to upload more than 30Mo.
> Do you now how I can correct this issue ?
That's great. Thanks a lot for your help.

System.Net.WebException:

Hi,
I am trying to make a simple file updload WinForm app.
Here's the code:
WebClient webClient = new WebClient();
webClient.UploadFile(new Uri("http://localhost/WebSite/Upload.aspx"),
"c:\\bin.zip");
My IIS 5.1 Web server uses default configuration.
If the file is less than 5Mo everything works fine. If the file is too big I
get this exception:
System.Net.WebException: The underlying connection was closed: An unexpected
error occurred on a receive. --> System.IO.IOException: Unable to read data
from the transport connection: An existing connection was forcibly closed by
the remote host. --> System.Net.Sockets.SocketException: An existing
connection was forcibly closed by the remote host
I will never have to upload more than 30Mo.
Do you now how I can correct this issue ?In the web.config file, the httpRunTime element has a maxRequestLength which
restricts the length in bytes of any HTTP request. The default is 4MB.
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
"zolof" <zolof@.discussions.microsoft.com> wrote in message
news:C12D293F-C3B4-401C-99A6-7A10DB48B8BE@.microsoft.com...
> Hi,
> I am trying to make a simple file updload WinForm app.
> Here's the code:
> WebClient webClient = new WebClient();
> webClient.UploadFile(new Uri("http://localhost/WebSite/Upload.aspx"),
> "c:\\bin.zip");
> My IIS 5.1 Web server uses default configuration.
> If the file is less than 5Mo everything works fine. If the file is too big
> I
> get this exception:
> System.Net.WebException: The underlying connection was closed: An
> unexpected
> error occurred on a receive. --> System.IO.IOException: Unable to read
> data
> from the transport connection: An existing connection was forcibly closed
> by
> the remote host. --> System.Net.Sockets.SocketException: An existing
> connection was forcibly closed by the remote host
> I will never have to upload more than 30Mo.
> Do you now how I can correct this issue ?
>
That's great. Thanks a lot for your help.

System.Net.WebException: The underlying connection was closed:

Hi Tim,

From your description, you've a ASP.NET webservcie and created a Winform
client app to consume it. However, when calling the webservice, you found
it worked well the first time but occured unexpected error the second time
after a few minutes, yes?

From the code you provided(calling the webservice), it seems all right and
I don't think the problem is likely in the client application. I'm not sure
about the webservice's detailed code logic in its webmethods but from the
method's signature:

WebSvcW.OMTestAddOrderXML(comboBox3.Text,int.Parse (textBox2.Text),comboBox4.
Text);

it takes simply type params, so I think we can test the webservice through
IE, open the certain url (http://...... .asmx) in the IE and call the
webservice thourgh it. It is better if you can use VS.NET to debug the
webservice on the serverside to see whether the problem also occured when
calling it from IE. If still remains, we can confirm that the problem is
not caused by the winform client , do you think so?

In addition, as for creating client application to consume webservice,
below is the related web link in MSDN:
#Creating Clients for XML Web Services
http://msdn.microsoft.com/library/e...atingclientsfor
webservices.asp?frame=true

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspxHi Tim,

Have you had a chance to view the suggestions in my last reply or have you
got any progresses on this issue? If there is anything else I can help,
please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Thanks for your reply. However, when I try to go directly to the ..asmx url via IA, when I click on the name of the web service in order to test, I receive this message - Tes
The test form is only available for requests from the local machine. Therefore, I am unclear on how to proceed. The server is in another state so I can't logon directly to it in order to test from my location. How shall I proceed

Thank you
Tim Reynold
Verizon
Hi Tim,

From your reply, you haven't the certain permission to logon the server
which host the webservice, yes? Then, I think we can do the following tests
on the webservice:

1. Creating a client proxy through the following guide(using wsdl.exe
rather than via VS.NET) and consume the webservice by the geneated proxy to
see whether the webservice still fail.
#Creating an XML Web Service Proxy
http://msdn.microsoft.com/library/e...atingWebService
Proxy.asp?frame=true

2. I'm not sure whether you have ever tried calling a webservice via
javascript(DHTML) in a webpage, if not, you may have a look at the
following reference:
#Accessing Web Services From DHTML
http://msdn.microsoft.com/library/e...001.asp?frame=t
rue

If you're able to perform a test via the DHTML way, we can further confirm
whether the problem is with the serverside or not.

In addtion, you can create a simple webservice( similiar with the one
you're consuming, maybe just take 2 string parameters) on your local
machine or a remote machine which you have full control on it. And then
call it on the local machine to see whether the same problem occurs. If
not, that also probably proof that the problem is likely due to the
webservice's serverside processing.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Tim,

Any progress on this issue? If you have any problems on this or if there're
anything else I can help, please feel free to let me know. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

System.Net.WebException: The underlying connection was closed:

Hi Tim,

From your description, you've a ASP.NET webservcie and created a Winform
client app to consume it. However, when calling the webservice, you found
it worked well the first time but occured unexpected error the second time
after a few minutes, yes?

From the code you provided(calling the webservice), it seems all right and
I don't think the problem is likely in the client application. I'm not sure
about the webservice's detailed code logic in its webmethods but from the
method's signature:

WebSvcW.OMTestAddOrderXML(comboBox3.Text,int.Parse (textBox2.Text),comboBox4.
Text);

it takes simply type params, so I think we can test the webservice through
IE, open the certain url (http://...... .asmx) in the IE and call the
webservice thourgh it. It is better if you can use VS.NET to debug the
webservice on the serverside to see whether the problem also occured when
calling it from IE. If still remains, we can confirm that the problem is
not caused by the winform client , do you think so?

In addition, as for creating client application to consume webservice,
below is the related web link in MSDN:
#Creating Clients for XML Web Services
http://msdn.microsoft.com/library/e...atingclientsfor
webservices.asp?frame=true

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspxHi Tim,

Have you had a chance to view the suggestions in my last reply or have you
got any progresses on this issue? If there is anything else I can help,
please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Thanks for your reply. However, when I try to go directly to the ..asmx url via IA, when I click on the name of the web service in order to test, I receive this message - Tes
The test form is only available for requests from the local machine. Therefore, I am unclear on how to proceed. The server is in another state so I can't logon directly to it in order to test from my location. How shall I proceed

Thank you
Tim Reynold
Verizon
Hi Tim,

From your reply, you haven't the certain permission to logon the server
which host the webservice, yes? Then, I think we can do the following tests
on the webservice:

1. Creating a client proxy through the following guide(using wsdl.exe
rather than via VS.NET) and consume the webservice by the geneated proxy to
see whether the webservice still fail.
#Creating an XML Web Service Proxy
http://msdn.microsoft.com/library/e...atingWebService
Proxy.asp?frame=true

2. I'm not sure whether you have ever tried calling a webservice via
javascript(DHTML) in a webpage, if not, you may have a look at the
following reference:
#Accessing Web Services From DHTML
http://msdn.microsoft.com/library/e...001.asp?frame=t
rue

If you're able to perform a test via the DHTML way, we can further confirm
whether the problem is with the serverside or not.

In addtion, you can create a simple webservice( similiar with the one
you're consuming, maybe just take 2 string parameters) on your local
machine or a remote machine which you have full control on it. And then
call it on the local machine to see whether the same problem occurs. If
not, that also probably proof that the problem is likely due to the
webservice's serverside processing.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Tim,

Any progress on this issue? If you have any problems on this or if there're
anything else I can help, please feel free to let me know. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

System.Net.WebException: The underlying connection was closed:

Hi Tim,

From your description, you've a ASP.NET webservcie and created a Winform
client app to consume it. However, when calling the webservice, you found
it worked well the first time but occured unexpected error the second time
after a few minutes, yes?

From the code you provided(calling the webservice), it seems all right and
I don't think the problem is likely in the client application. I'm not sure
about the webservice's detailed code logic in its webmethods but from the
method's signature:

WebSvcW.OMTestAddOrderXML(comboBox3.Text,int.Parse (textBox2.Text),comboBox4.
Text);

it takes simply type params, so I think we can test the webservice through
IE, open the certain url (http://...... .asmx) in the IE and call the
webservice thourgh it. It is better if you can use VS.NET to debug the
webservice on the serverside to see whether the problem also occured when
calling it from IE. If still remains, we can confirm that the problem is
not caused by the winform client , do you think so?

In addition, as for creating client application to consume webservice,
below is the related web link in MSDN:
#Creating Clients for XML Web Services
http://msdn.microsoft.com/library/e...atingclientsfor
webservices.asp?frame=true

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspxHi Tim,

Have you had a chance to view the suggestions in my last reply or have you
got any progresses on this issue? If there is anything else I can help,
please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Thanks for your reply. However, when I try to go directly to the ..asmx url via IA, when I click on the name of the web service in order to test, I receive this message - Tes
The test form is only available for requests from the local machine. Therefore, I am unclear on how to proceed. The server is in another state so I can't logon directly to it in order to test from my location. How shall I proceed

Thank you
Tim Reynold
Verizon
Hi Tim,

From your reply, you haven't the certain permission to logon the server
which host the webservice, yes? Then, I think we can do the following tests
on the webservice:

1. Creating a client proxy through the following guide(using wsdl.exe
rather than via VS.NET) and consume the webservice by the geneated proxy to
see whether the webservice still fail.
#Creating an XML Web Service Proxy
http://msdn.microsoft.com/library/e...atingWebService
Proxy.asp?frame=true

2. I'm not sure whether you have ever tried calling a webservice via
javascript(DHTML) in a webpage, if not, you may have a look at the
following reference:
#Accessing Web Services From DHTML
http://msdn.microsoft.com/library/e...001.asp?frame=t
rue

If you're able to perform a test via the DHTML way, we can further confirm
whether the problem is with the serverside or not.

In addtion, you can create a simple webservice( similiar with the one
you're consuming, maybe just take 2 string parameters) on your local
machine or a remote machine which you have full control on it. And then
call it on the local machine to see whether the same problem occurs. If
not, that also probably proof that the problem is likely due to the
webservice's serverside processing.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Tim,

From your reply, you haven't the certain permission to logon the server
which host the webservice, yes? Then, I think we can do the following tests
on the webservice:

1. Creating a client proxy through the following guide(using wsdl.exe
rather than via VS.NET) and consume the webservice by the geneated proxy to
see whether the webservice still fail.
#Creating an XML Web Service Proxy
http://msdn.microsoft.com/library/e...atingWebService
Proxy.asp?frame=true

2. I'm not sure whether you have ever tried calling a webservice via
javascript(DHTML) in a webpage, if not, you may have a look at the
following reference:
#Accessing Web Services From DHTML
http://msdn.microsoft.com/library/e...001.asp?frame=t
rue

If you're able to perform a test via the DHTML way, we can further confirm
whether the problem is with the serverside or not.

In addtion, you can create a simple webservice( similiar with the one
you're consuming, maybe just take 2 string parameters) on your local
machine or a remote machine which you have full control on it. And then
call it on the local machine to see whether the same problem occurs. If
not, that also probably proof that the problem is likely due to the
webservice's serverside processing.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Tim,

Any progress on this issue? If you have any problems on this or if there're
anything else I can help, please feel free to let me know. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Tim,

Any progress on this issue? If you have any problems on this or if there're
anything else I can help, please feel free to let me know. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

System.Net.WebException: The underlying connection was closed:

Team,
We have deployed a webservice (asmx.cs) to a server. We have created a windo
ws app (C# using visual studios.net 2003 Enterprise Arch) that refers to the
web service. In the windows app, we added the web reference - referring to
the ?wsdl file. The C# co
de is quite simple:
VOSEWebServicesDevW.WebServices WebSvcW = new VOSEWebServicesDevW.WebService
s();
returncode = WebSvcW.OMTestAddOrderXML(comboBox3.Text,int.Parse(textBox2.Tex
t),comboBox4.Text);
This works fine the first time- but when it sits a few minutes and we retry
, we receive...
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Net.WebException: The underlying connection was closed: An unexpected
error occurred on a send.
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebReq
uest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String method
Name, Object[] parameters)
at TestWebServiceW.VOSEWebServicesDevW.WebServices.OMTestAddOrderXML(String
strCompany, Int32 intOrderNo, String strOrderType)
at TestWebServiceW.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, I
nt32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
The project for the web service has a web.config file. I see no settings in
there of interest. I am new to this.
I would appreciate the guidance on what to do in the windows app C# code to
correctly access the web service on the team's server without having to clos
e & restart the windows app.
Thanks,
Tim Reynolds
VerizonHi Tim,
From your description, you've a ASP.NET webservcie and created a Winform
client app to consume it. However, when calling the webservice, you found
it worked well the first time but occured unexpected error the second time
after a few minutes, yes?
From the code you provided(calling the webservice), it seems all right and
I don't think the problem is likely in the client application. I'm not sure
about the webservice's detailed code logic in its webmethods but from the
method's signature:
WebSvcW.OMTestAddOrderXML(comboBox3.Text,int.Parse(textBox2.Text),comboBox4.
Text);
it takes simply type params, so I think we can test the webservice through
IE, open the certain url (http://...... .asmx) in the IE and call the
webservice thourgh it. It is better if you can use VS.NET to debug the
webservice on the serverside to see whether the problem also occured when
calling it from IE. If still remains, we can confirm that the problem is
not caused by the winform client , do you think so?
In addition, as for creating client application to consume webservice,
below is the related web link in MSDN:
#Creating Clients for XML Web Services
http://msdn.microsoft.com/library/e...atingclientsfor
webservices.asp?frame=true
Hope also helps. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Tim,
Have you had a chance to view the suggestions in my last reply or have you
got any progresses on this issue? If there is anything else I can help,
please feel free to post here. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Thanks for your reply. However, when I try to go directly to the ..asmx url
via IA, when I click on the name of the web service in order to test, I rec
eive this message - Test
The test form is only available for requests from the local machine. There
fore, I am unclear on how to proceed. The server is in another state so I ca
n't logon directly to it in order to test from my location. How shall I pro
ceed?
Thank you,
Tim Reynolds
Verizon
Hi Tim,
Any progress on this issue? If you have any problems on this or if there're
anything else I can help, please feel free to let me know. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Tim,
From your reply, you haven't the certain permission to logon the server
which host the webservice, yes? Then, I think we can do the following tests
on the webservice:
1. Creating a client proxy through the following guide(using wsdl.exe
rather than via VS.NET) and consume the webservice by the geneated proxy to
see whether the webservice still fail.
#Creating an XML Web Service Proxy
http://msdn.microsoft.com/library/e...atingWebService
Proxy.asp?frame=true
2. I'm not sure whether you have ever tried calling a webservice via
javascript(DHTML) in a webpage, if not, you may have a look at the
following reference:
#Accessing Web Services From DHTML
http://msdn.microsoft.com/library/e...001.asp?frame=t
rue
If you're able to perform a test via the DHTML way, we can further confirm
whether the problem is with the serverside or not.
In addtion, you can create a simple webservice( similiar with the one
you're consuming, maybe just take 2 string parameters) on your local
machine or a remote machine which you have full control on it. And then
call it on the local machine to see whether the same problem occurs. If
not, that also probably proof that the problem is likely due to the
webservice's serverside processing.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Tuesday, March 13, 2012

System.Runtime.InteropServices.COMException: Class not registered

Hello,
I'm trying to develop an ASP.NET application that uses a third-party COM
dll. I've added a reference to the dll in the web app project along with
adding a "using" directive in the code-behind (referencing the COM
namespace). Every time I try and run the application and call methods on th
e
COM object, I get the following error:
System.Runtime.InteropServices.COMException: Class not registered
I've successfully registered the dll using regsvr32 and added
the AspCompat="true" directive on the Page, but doesn't seem to help.
I'd really appreciate any suggestions on how to remedy this problem.
Thanks for your time.
DonnieAre u using VS.NET?
"Donnie" <Donnie@.discussions.microsoft.com> wrote in message
news:2A43630B-C5AE-4AC7-9656-EA496352E760@.microsoft.com...
> Hello,
> I'm trying to develop an ASP.NET application that uses a third-party COM
> dll. I've added a reference to the dll in the web app project along with
> adding a "using" directive in the code-behind (referencing the COM
> namespace). Every time I try and run the application and call methods on
the
> COM object, I get the following error:
> System.Runtime.InteropServices.COMException: Class not registered
> I've successfully registered the dll using regsvr32 and added
> the AspCompat="true" directive on the Page, but doesn't seem to help.
> I'd really appreciate any suggestions on how to remedy this problem.
> Thanks for your time.
> Donnie
>

System.Runtime.InteropServices.COMException: Class not registered

Hello,
I'm trying to develop an ASP.NET application that uses a third-party COM
dll. I've added a reference to the dll in the web app project along with
adding a "using" directive in the code-behind (referencing the COM
namespace). Every time I try and run the application and call methods on the
COM object, I get the following error:

System.Runtime.InteropServices.COMException: Class not registered

I've successfully registered the dll using regsvr32 and added
the AspCompat="true" directive on the Page, but doesn't seem to help.

I'd really appreciate any suggestions on how to remedy this problem.

Thanks for your time.

DonnieAre u using VS.NET?

"Donnie" <Donnie@.discussions.microsoft.com> wrote in message
news:2A43630B-C5AE-4AC7-9656-EA496352E760@.microsoft.com...
> Hello,
> I'm trying to develop an ASP.NET application that uses a third-party COM
> dll. I've added a reference to the dll in the web app project along with
> adding a "using" directive in the code-behind (referencing the COM
> namespace). Every time I try and run the application and call methods on
the
> COM object, I get the following error:
> System.Runtime.InteropServices.COMException: Class not registered
> I've successfully registered the dll using regsvr32 and added
> the AspCompat="true" directive on the Page, but doesn't seem to help.
> I'd really appreciate any suggestions on how to remedy this problem.
> Thanks for your time.
> Donnie

System.Threading.ThreadAbortException and Response.Redirect

I have an ASP.net 2.0 app on a W2K3 box. I am using Response.Redirect inside page_load. After reading a bunch of posts, I've tried setting the second arg to false, but still get the error. I've also tried moving the redirect outside the try block. No love. I catch and ignore the error, but the redirect doesn't redirect to the new url.

All worked fine until this started happening out of the blue.

Thanks.

I assume you meant to post your code... but you forgot. Can you post your problem code please?


oops. Sorry.

If Request.QueryString("testnum") Is Nothing Then
Response.Redirect("http://localhost:10607/WWW/testing.aspx?testnum=1.11-.01-C1-T1&ucid=0")

End if


Have you tried using a relative URL, instead of an absolute URL?

The thing is, the built in web server in Visual Studio (Cassini) uses dynamic port assignment. Therefore, there is no guarantee (in fact no likelihood at all) that the port used will be the same every time.

Try a URL of"~/testing.aspx?testnum=1.11-.01-C1-T1&ucid=0"