Showing posts with label service. Show all posts
Showing posts with label service. Show all posts

Wednesday, March 28, 2012

System.InvalidOperationException: Timeout expired when calling a ASP.NET service

I get this error when calling an ASP.NET service. Any idea what this is and how to prevent it?

System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

This probably means that your service is leaking database connections. You must Dispose() (or Close()) all resources that implement the IDisposable interface, which includes such things as SqlConnection etc. The best way to ensure this is usually to enclose the usage in a 'using'-statement. Check out the text and example here:http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection(vs.80).aspx .
Well I do see someone put recycle threads at 1740 minutes...which is normally 20minutes. Do you think that could cause the problem?

No. That's not the problem. If you're leaking connections you must fix that. The default recycle is set at 1740 iirc for IIS 6, not 20 minutes. You do not want to recycle every 20 minutes! That's like getting a bigger bucket to scoop out the water of your boat instead of fixing the holes. It'll work for a time, but sooner or later you'll sink anyway.

Fix the code.


I can see where the SQL connections were not closed. So I added the close code as well. But these are one time hits to a service so I see no reason why the worker processes could not be recycled sooner and save on any memory of any "hung" threads.

If you have hung threads you should ensure that they do not hang. Killing the entire worker process is sort of like than swatting flies with a sledgehammer, you'll mostly miss and in most cases cause more harm in the process of trying than was originally caused by the problem. (This seems to be my day for analogies... ;-) Depending on process recycling to fix problems that should be fixed in code is, well, just simply bad. In the best case you'll have less performance than you'd get otherwise (this may not be a concern by itself, if you have capacity to spare but...) in the worst case, which is the common case, you'll get an unstable site that sometimes works, and sometimes do not. Also - if you're using sessions stored in process, the users will loose these sessions at the time of the recycle - in effect, every 20 minutes all the currently active users will loose their session. That's not so good.

If you have anything cached - you loose it. You'll have to reload the entire AppDomain. All in all - worker process recycling is pretty costly. Don't use it as a way to hide the bugs in your code!

You should engineer your site to be able to run forever. You may for example check this link:http://www.asp.net/faq/AspNetAndIIS6.aspx - note that automatic process recycling is not recommended! (There are some various views on this subject, but you'll find no-one recommending it every 20 minutes for any reason!)

Reactive process recycling, i.e. as a response to an error condition, is ok since it increases the application up-time - but should always be accompanied by an alarm, so that the root cause can be eliminated.


I just talked with the guy that wrote the code causing the problem as I still close connections and try and manage memory like an old ASP programmer. But he and I attended classes on asp.net where Microsoft reps told us there is no need to close SQL connections or do any of this stuff as asp.net as automatic garbage collection and automatically cleans itself up from all of this.

But what this shows is, we are right back to the point where a users bad code can take down the entire web server...not a great feeling.


Don't know what the Microsoft reps were taking, but unfortunately they were wrong and you are right in more ways than one.

Garbage collection does remove the risk for memory leaks, unfortunately it introduces the twofold problems of indeterminite response time (you can't know when a garbage collection may be required, thus cannot guarantee a minimum response time which makes the whole platform more or less useless for anything approaching real-time scenarios) and memory fragmentation in the large object heap in the end leading to out of memory conditions (one of the few reasons you may in fact have to recycle).

Garbage collection does not solve the problem of unmanaged resources, nor does it solve the problem of untimely shortage of some resources. The database pool connections will in fact be reclaimed at some point by garbage collection, but shortage of such a resource does not trigger a forced gc to that will ensure any loose ones to be reclaimed - causing the effects you noted.

So - If an object implements IDisposable, you're stuck with managing it and ensuring it's timely disposal just like in the old days. But there is the nice 'using' statement to help you with that chore... ;-)

Saturday, March 24, 2012

System.Net.WebException

Hi,
I am calling an external web service that returns some data which is being
displayed on my ASP.NET page. This page refreshes every 60 seconds and pulls
the updated data from the web service.
The page works great for a few minutes and then all of a sudden throws the
following error:
System.Net.WebException: Unable to connect to the remote server -->
System.Net.Sockets.SocketException: A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState
state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
-- End of inner exception stack trace --
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at fhlb.cmkt.CFM.proxy.NetWireService.NetWireService.getNetWires(getNetWires
getNetWires1) in E:\Projects\CapitalMarkets\CFM\fhlb.cmkt.proxy\Web
References\NetWireService\Reference.cs:line 115
at fhlb.cmkt.CFM.CashFlowMonitor.getNetWiresSecured()
at fhlb.cmkt.CFM.CashFlowMonitor.Page_Load(Object sender, EventArgs e)
Using ASP.NET 2.0 on IIS 6.0 (Windows Server 2003).
Any help will be greatly appreciated.
Thanks!this is normal. it just a timeout on a page request. you need to decide how
to handle it. maybe save the last results and resuse.
-- bruce (sqlwork.com)
"Vijay" wrote:

> Hi,
> I am calling an external web service that returns some data which is being
> displayed on my ASP.NET page. This page refreshes every 60 seconds and pul
ls
> the updated data from the web service.
> The page works great for a few minutes and then all of a sudden throws the
> following error:
> System.Net.WebException: Unable to connect to the remote server -->
> System.Net.Sockets.SocketException: A connection attempt failed because th
e
> connected party did not properly respond after a period of time, or
> established connection failed because connected host has failed to respond
> at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
> SocketAddress socketAddress)
> at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
> at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
> Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketSta
te
> state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
> -- End of inner exception stack trace --
> at System.Net.HttpWebRequest.GetRequestStream()
> at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters)
> at fhlb.cmkt.CFM.proxy.NetWireService.NetWireService.getNetWires(getNetWir
es
> getNetWires1) in E:\Projects\CapitalMarkets\CFM\fhlb.cmkt.proxy\Web
> References\NetWireService\Reference.cs:line 115
> at fhlb.cmkt.CFM.CashFlowMonitor.getNetWiresSecured()
> at fhlb.cmkt.CFM.CashFlowMonitor.Page_Load(Object sender, EventArgs e)
> Using ASP.NET 2.0 on IIS 6.0 (Windows Server 2003).
> Any help will be greatly appreciated.
> Thanks!
Thanks for the quick reply Bruce.
Is it a timeout on the webpage that is calling the web service or is it a
timeout that is occuring on the web service? What does it mean when you say
"save the last results and reuse" ?
Thanks!
Vijay
"bruce barker" wrote:
> this is normal. it just a timeout on a page request. you need to decide ho
w
> to handle it. maybe save the last results and resuse.
> -- bruce (sqlwork.com)
>
> "Vijay" wrote:
>

System.Net.WebException: The remote server returned an error: (500) Internal Server Error.

Hi
I am trying to consume a web service from asp.net web page through
HTTP POST method and I am getting the following error message

"System.Net.WebException: The remote server returned an error: (500)
Internal Server Error."

I have been searchign the web and followed all the options which worked

for others

1. Changed the web.config of the web service to accomodate HttpPost
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices
2. Used the HttpRequest.Credentials =
CredentialCache.DefaultCredentials;

I am not sure what is wrong there it fails while the request is sent to

the web service. The web service works fine with other web clients

Let me know your ideas

thanks
MohanOther web clients? What is different? Run the debugger on the server,
set a breakpoint and POST from your client, and step through the code
sirfunusa wrote:
> Other web clients? What is different? Run the debugger on the server,
> set a breakpoint and POST from your client, and step through the code

Other clients I mean when I reference the web service and access the
web method it works fine...But when I use an ASP.NET page with the
HTTPReuest Object as shown below it throws the error

"System.Net.WebException: The remote server returned an error: (500)
Internal Server Error."

Code :

HttpWebRequest wr =
(HttpWebRequest)WebRequest.Create("http://localhost//SubtractNumbers//Service1.asmx//Subtract");

wr.Method = "POST";
wr.ContentType = "application/x-www-form-urlencoded";
//wr.ContentLength = bytes.Length;

StreamWriter writer = new
StreamWriter(wr.GetRequestStream(),System.Text.Enc oding.UTF8);
//// Write the xml text into the stream
writer.WriteLine("Hi");
writer.Close();

WebResponse wrs = wr.GetResponse();
Stream strm = wrs.GetResponseStream();
StreamReader sr = new StreamReader(strm);
String line;
while( (line = sr.ReadLine()) != null)
Response.Write(line);
strm.Close();
sirfunusa wrote:
> Other web clients? What is different? Run the debugger on the server,
> set a breakpoint and POST from your client, and step through the code

Other clients I mean when I reference the web service and access the
web method it works fine...But when I use an ASP.NET page with the
HTTPReuest Object as shown below it throws the error

"System.Net.WebException: The remote server returned an error: (500)
Internal Server Error."

Code :

HttpWebRequest wr =
(HttpWebRequest)WebRequest.Create("http://localhost//SubtractNumbers//Service1.asmx//Subtract");

wr.Method = "POST";
wr.ContentType = "application/x-www-form-urlencoded";
//wr.ContentLength = bytes.Length;

StreamWriter writer = new
StreamWriter(wr.GetRequestStream(),System.Text.Enc oding.UTF8);
//// Write the xml text into the stream
writer.WriteLine("Hi");
writer.Close();

WebResponse wrs = wr.GetResponse();
Stream strm = wrs.GetResponseStream();
StreamReader sr = new StreamReader(strm);
String line;
while( (line = sr.ReadLine()) != null)
Response.Write(line);
strm.Close();
Are you sending the proper XML message (SOAP)? If your message isn't
formatted properly, you will definately get a server 500 error back.
It looks liek you are actually just sending text ("Hi"). That's not a
proper SOAP message. Here is a sample of a SOAP message:
http://www.w3.org/2004/06/03-google-soap-wsdl.html .

I personally much of web services manually because it's just easier to
interop with COM that way.

Here's part of what I do... (also be sure to set your SOAPAction in the
http header!) messageData hold my XML message I'm sending.

ASCIIEncoding encoding = new ASCIIEncoding( );
byte[] buffer = encoding.GetBytes(messageData);

HttpWebRequest myRequest =
(HttpWebRequest)WebRequest.Create(this.EndPoint);
myRequest.Method = "POST";
myRequest.ContentType = "text/xml";
myRequest.ContentLength = buffer.Length;
myRequest.Headers.Add(String.Format("SOAPAction: \"{0}\"",
operationName));
myRequest.Timeout = 10000;

using (Stream newStream = myRequest.GetRequestStream( )) {
newStream.Write(buffer, 0, buffer.Length);
newStream.Close( );
}

HttpWebResponse myHttpWebResponse =
(HttpWebResponse)myRequest.GetResponse( );

string rawResponse =
GetWebResponseString(myHttpWebResponse);

myHttpWebResponse.Close( );

Here is the GetWebResponseString method...

private static string GetWebResponseString(WebResponse
myHttpWebResponse) {
StringBuilder rawResponse = new StringBuilder( );
using (Stream streamResponse =
myHttpWebResponse.GetResponseStream( )) {
using (StreamReader streamRead = new
StreamReader(streamResponse)) {
Char[] readBuffer = new Char[256];
int count = streamRead.Read(readBuffer, 0, 256);

while (count > 0) {
String resultData = new String(readBuffer, 0,
count);
rawResponse.Append(resultData);
count = streamRead.Read(readBuffer, 0, 256);
}
}
}
return rawResponse.ToString( );
}

Look closely at what is returned. You may actually be getting the
reason for the fault in the message.

Also, if all is successful, you will get an XML message back. Are you
prepared to parse it?

You may want to actually use the .NET web service mechanism if you
don't want to do everything manually. Since you aren't using the .NET
web service mechanism the web.config configuration doesn't apply.

If you are intending to use .NET for web services, then all you have to
do is add the WSDL file as a web reference and use it as though it were
local. There's not really much work to it. If that is the case then
everything I said above is void, since this is the manual way to do it.

System.Net.WebException: The request failed with the error message:Object moved to he

Greetings,
This question is related to Microsoft Reporting Services Web service. I
tried asking it in RS groups but no one seems to be knowledgeable enough to
answer, so I wanted to try my chances here. Thanks...
I am trying to get the code below to work with no success, I googled the
issue but docs popped up provided little help. Basically I am trying to
create a directory in RS that uses Forms authentication. Everything works on
the Forms authentication side, but it looks like the cookie created using
the web service somehow does not satisfy RS and it tries to redirect to the
logon page.
Could you point me with a document or just provide me with a working sample?
I already tried Teo Lachev's example with no luck.
Thanks,
Skep...
PS: Both web application and the RS are on the same server.
ReportingService rs = new ReportingService();
ReportServerProxy server = new ReportServerProxy();
// Get the server URL from the Report Manager configuration file
server.Url = AuthenticationUtilities.GetWebServiceUrl();
bool passwordVerified = false;
try
{
server.LogonUser("user","password", null);
passwordVerified = true;
}
catch(System.Web.Services.Protocols.SoapException)
{
Message.Text = "Login Error, please try again";
return;
}
// Create a custom property for the folder.
Property newProp = new Property();
newProp.Name = "Department";
newProp.Value = "Finance";
Property[] props = new Property[1];
props[0] = newProp;
string folderName = "Budget";
try
{
rs.CreateFolder(folderName, "/", props );
Label2.Text="Folder created: "+ folderName;
}
catch(Exception ex)
{
Message.Text=ex.ToString();
}Hi Skeptical:
How is the LogonUser call itself authenticated? Do you have anon
access for that call?
I suspect you need to create a CookieContainer object and assign the
instance to the Cookie property of the SSRS proxy class. The
CookieContainer will accept the Set-Cookie header from SSRS and pass
the cookie along on subsequest requests.
Scott
http://www.OdeToCode.com/blogs/scott/
On Thu, 19 May 2005 15:58:56 -0500, "Skeptical" <skep@.nowhere.com>
wrote:

>Greetings,
>This question is related to Microsoft Reporting Services Web service. I
>tried asking it in RS groups but no one seems to be knowledgeable enough to
>answer, so I wanted to try my chances here. Thanks...
>
>I am trying to get the code below to work with no success, I googled the
>issue but docs popped up provided little help. Basically I am trying to
>create a directory in RS that uses Forms authentication. Everything works o
n
>the Forms authentication side, but it looks like the cookie created using
>the web service somehow does not satisfy RS and it tries to redirect to the
>logon page.
>Could you point me with a document or just provide me with a working sample
?
>I already tried Teo Lachev's example with no luck.
>Thanks,
>Skep...
>PS: Both web application and the RS are on the same server.
>
>ReportingService rs = new ReportingService();
>ReportServerProxy server = new ReportServerProxy();
>// Get the server URL from the Report Manager configuration file
>server.Url = AuthenticationUtilities.GetWebServiceUrl();
>bool passwordVerified = false;
>try
>{
>server.LogonUser("user","password", null);
>passwordVerified = true;
>}
>catch(System.Web.Services.Protocols.SoapException)
>{
>Message.Text = "Login Error, please try again";
>return;
>}
>// Create a custom property for the folder.
>Property newProp = new Property();
>newProp.Name = "Department";
>newProp.Value = "Finance";
>Property[] props = new Property[1];
>props[0] = newProp;
>string folderName = "Budget";
>try
>{
>rs.CreateFolder(folderName, "/", props );
>Label2.Text="Folder created: "+ folderName;
>}
>catch(Exception ex)
>{
>Message.Text=ex.ToString();
>}
>
>

System.Net.WebException: The request failed with the error message:Object moved to here

Greetings,

This question is related to Microsoft Reporting Services Web service. I
tried asking it in RS groups but no one seems to be knowledgeable enough to
answer, so I wanted to try my chances here. Thanks...

I am trying to get the code below to work with no success, I googled the
issue but docs popped up provided little help. Basically I am trying to
create a directory in RS that uses Forms authentication. Everything works on
the Forms authentication side, but it looks like the cookie created using
the web service somehow does not satisfy RS and it tries to redirect to the
logon page.

Could you point me with a document or just provide me with a working sample?

I already tried Teo Lachev's example with no luck.

Thanks,

Skep...

PS: Both web application and the RS are on the same server.

ReportingService rs = new ReportingService();
ReportServerProxy server = new ReportServerProxy();

// Get the server URL from the Report Manager configuration file
server.Url = AuthenticationUtilities.GetWebServiceUrl();
bool passwordVerified = false;
try
{
server.LogonUser("user","password", null);
passwordVerified = true;
}
catch(System.Web.Services.Protocols.SoapException)
{
Message.Text = "Login Error, please try again";
return;
}
// Create a custom property for the folder.
Property newProp = new Property();
newProp.Name = "Department";
newProp.Value = "Finance";
Property[] props = new Property[1];
props[0] = newProp;
string folderName = "Budget";
try
{
rs.CreateFolder(folderName, "/", props );
Label2.Text="Folder created: "+ folderName;
}
catch(Exception ex)
{
Message.Text=ex.ToString();
}Hi Skeptical:

How is the LogonUser call itself authenticated? Do you have anon
access for that call?

I suspect you need to create a CookieContainer object and assign the
instance to the Cookie property of the SSRS proxy class. The
CookieContainer will accept the Set-Cookie header from SSRS and pass
the cookie along on subsequest requests.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 19 May 2005 15:58:56 -0500, "Skeptical" <skep@.nowhere.com>
wrote:

>Greetings,
>This question is related to Microsoft Reporting Services Web service. I
>tried asking it in RS groups but no one seems to be knowledgeable enough to
>answer, so I wanted to try my chances here. Thanks...
>
>I am trying to get the code below to work with no success, I googled the
>issue but docs popped up provided little help. Basically I am trying to
>create a directory in RS that uses Forms authentication. Everything works on
>the Forms authentication side, but it looks like the cookie created using
>the web service somehow does not satisfy RS and it tries to redirect to the
>logon page.
>Could you point me with a document or just provide me with a working sample?
>I already tried Teo Lachev's example with no luck.
>Thanks,
>Skep...
>PS: Both web application and the RS are on the same server.
>
>ReportingService rs = new ReportingService();
>ReportServerProxy server = new ReportServerProxy();
>// Get the server URL from the Report Manager configuration file
>server.Url = AuthenticationUtilities.GetWebServiceUrl();
>bool passwordVerified = false;
>try
>{
>server.LogonUser("user","password", null);
>passwordVerified = true;
>}
>catch(System.Web.Services.Protocols.SoapException)
>{
>Message.Text = "Login Error, please try again";
>return;
>}
>// Create a custom property for the folder.
>Property newProp = new Property();
>newProp.Name = "Department";
>newProp.Value = "Finance";
>Property[] props = new Property[1];
>props[0] = newProp;
>string folderName = "Budget";
>try
>{
>rs.CreateFolder(folderName, "/", props );
>Label2.Text="Folder created: "+ folderName;
>}
>catch(Exception ex)
>{
>Message.Text=ex.ToString();
>}

System.Net.WebException: The underlying connection was closed: An unexpected error occurre

I get this error intermittently while using a web service on my local machine.
----------------------------------------------------------
System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. -->

System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. -->

System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine at System.Net.Sockets.Socket.MultipleSend(BufferOffsetSize[] buffers, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers) --
End of inner exception stack trace --
at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers) at System.Net.PooledStream.MultipleWrite(BufferOffsetSize[] buffers) at System.Net.Connection.Write(ScatterGatherBuffers writeBuffer) at System.Net.ConnectStream.ResubmitWrite(ConnectStream oldStream, Boolean suppressWrite) --
End of inner exception stack trace --
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at QueuesUtilitiesWS.QueuesUtilitiesService.utilitiesGetHosts() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Temporary ASP.NET Files\website\d482aaa7\b121dbcb\bysspbbr.1.cs:line 50 at QManager.GetQInfo() in c:\MyData\Development\UPMC.2.0.net\Developers\dextdr\WebSite\QManager.aspx.cs:line 97
----------------------------------------------------------
I can't figure out what the problem is and most of the posts I've Googled don't seem to have a very good resolution either.
I'm using Whidbey beta 2
Thanks.
Doug
I have the same error. Please help me! Thanks!
"An established connection was aborted by the software in your host machine"
I have the same error. Who can help me? Thanks!
Hi there..
I have not found an answer to this problem yet.
Check this out though:

http://weblogs.asp.net/jan/archive/2004/01/28/63771.aspx
Let me know if you figure it out and I will do the same.
God Bless.
Doug
Any luck on solving this problem?
We have a Reporting Services server and client program we have been running for a year. Lately, it is has been randomly failing with the same message.
I tried the keepalive fix but that is causing an access denied error. I then tried the fix for the 401 message in the MSDN knowledge base w/o success

//Create an instance of the CredentialCache class.
System.Net.CredentialCache cache =new System.Net.CredentialCache();

// Add a NetworkCredential instance to CredentialCache.

// Negotiate for NTLM or Kerberos authentication.
cache.Add(new Uri(rs.Url), "Negotiate",new System.Net.NetworkCredential("username", "password", "domain"));

//Assign CredentialCache to the Web service Client Proxy(myProxy) Credetials property.
rs.Credentials = cache;


Unhandled Exception: System.Net.WebException: The request failed with HTTP status 401: Access Denied.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at ReportManager.RsService.ReportingService.ListChildren(String Item, Boolean Recursive) in c:\webprojects.n
at ReportManager.ReportHelper.GetItemList(String rootPath, ItemTypeEnum[] typeList, Boolean recursive) in c:

Thanks!

Nope, not yet...
But our next step was to override the GetWebRequest method and set the KeepAlive property of the webrequest object to false:
protected override System.Net.WebRequest GetWebRequest(Uri uri)
{
System.Net.HttpWebRequest webRequest =
(System.Net.HttpWebRequest) base.GetWebRequest(uri);
webRequest.KeepAlive = false;
return webRequest;
}
Check out the link above in my previous post...
Let me know if it works!
thanks
Doug

Ithinkwe've found that the problem is not as I previously thought.
The software architect pointed me in this direction:
--------------------------
Make sure that the URL property of the webservice object is set to the correct url.
IE:
public QueuesWS.QueuesService qSvc =new QueuesWS.QueuesService();
qSvc.Credentials = System.Net.CredentialCache.DefaultCredentials;
qSvc.URL = "http://localhost:7506/QueuesWS/QueuesService.asmx";
--------------------------
Itseems to have helped.
For now.
God Bless.
Doug


Nope.

Still not fixed.
I was wrong (again).


Followup to my original post:
I now believe there to be a resource consumption issue in Reporting Services when you are performing a large number of management actions through the web services. Our program creates links for many users/reports and sets permissions on their folders. When it gets to a certain, reproducible point (around 300 links), the error occurs for the next 120 seconds (like clockwork). After that we can continue on for another for ~300 links.
We adjusted every RS config variable we could w/o luck. Also, we checked everything we could using perfmon.
So, I swallowed my pride :) and added a sleep for 120 seconds after every 300 links. The program takes a little while longer but at least it runs to completion w/o each night.
Hope this helps someone.
Mike

Tuesday, March 13, 2012

'System.ServiceModel/ServiceHostingEnvironment' configuration section cannot be c

On Jun 5, 10:10 pm, "Sachin" <Sachi...@dotnet.itags.org.Email.com> wrote:
> Hi All,
> I deployed an ASP.NET Web Service on Server1 and it worked fine.
> However when I deployed the same Web Service on Server2 I am getting the
> following error,
> The 'System.ServiceModel/ServiceHostingEnvironment' configuration section
> cannot be created.
> The Machin.config file is missing information.
> Verify that this configuration section is properly registered and that you
> have correctly splled the section name.
> For Windoes Communication Foundation sections, run ServiceModelReg.exe -i
to
> fix this error.
> ...................
> I never saw this error. What could be wrong?
> Any pointer?
> Thanks in advance
> Sachin
Verify the version of ASP.NET.
aspnet_regiis -ls
aspnet_regiis -i
etc...On both server its .NET 2.0
"Alexey Smirnov" <alexey.smirnov@.gmail.com> wrote in message
news:1181074886.601979.301780@.n4g2000hsb.googlegroups.com...
> On Jun 5, 10:10 pm, "Sachin" <Sachi...@.Email.com> wrote:
> Verify the version of ASP.NET.
> aspnet_regiis -ls
> aspnet_regiis -i
> etc...
>

'System.ServiceModel/ServiceHostingEnvironment' configuration section cannot be created.

Hi All,

I deployed an ASP.NET Web Service on Server1 and it worked fine.
However when I deployed the same Web Service on Server2 I am getting the
following error,

The 'System.ServiceModel/ServiceHostingEnvironment' configuration section
cannot be created.
The Machin.config file is missing information.
Verify that this configuration section is properly registered and that you
have correctly splled the section name.
For Windoes Communication Foundation sections, run ServiceModelReg.exe -i to
fix this error.
....................

I never saw this error. What could be wrong?

Any pointer?

Thanks in advance
SachinOn Jun 5, 10:10 pm, "Sachin" <Sachi...@.Email.comwrote:

Quote:

Originally Posted by

Hi All,
>
I deployed an ASP.NET Web Service on Server1 and it worked fine.
However when I deployed the same Web Service on Server2 I am getting the
following error,
>
The 'System.ServiceModel/ServiceHostingEnvironment' configuration section
cannot be created.
The Machin.config file is missing information.
Verify that this configuration section is properly registered and that you
have correctly splled the section name.
For Windoes Communication Foundation sections, run ServiceModelReg.exe -i to
fix this error.
...................
>
I never saw this error. What could be wrong?
>
Any pointer?
>
Thanks in advance
Sachin


Verify the version of ASP.NET.

aspnet_regiis -ls
aspnet_regiis -i
etc...
On both server its .NET 2.0

"Alexey Smirnov" <alexey.smirnov@.gmail.comwrote in message
news:1181074886.601979.301780@.n4g2000hsb.googlegro ups.com...

Quote:

Originally Posted by

On Jun 5, 10:10 pm, "Sachin" <Sachi...@.Email.comwrote:

Quote:

Originally Posted by

>Hi All,
>>
>I deployed an ASP.NET Web Service on Server1 and it worked fine.
>However when I deployed the same Web Service on Server2 I am getting the
>following error,
>>
>The 'System.ServiceModel/ServiceHostingEnvironment' configuration section
>cannot be created.
>The Machin.config file is missing information.
>Verify that this configuration section is properly registered and that
>you
>have correctly splled the section name.
>For Windoes Communication Foundation sections, run ServiceModelReg.exe -i
>to
>fix this error.
>...................
>>
>I never saw this error. What could be wrong?
>>
>Any pointer?
>>
>Thanks in advance
>Sachin


>
Verify the version of ASP.NET.
>
aspnet_regiis -ls
aspnet_regiis -i
etc...
>


On Jun 5, 11:22 pm, "Sachin" <Sachi...@.Email.comwrote:

Quote:

Originally Posted by

On both server its .NET 2.0
>


Did you installed the .NET 3.0 on the Server2?
No.

This is what I get at the bottom of the error page.

Version Information: Microsoft .NET Framework Version: 2.0.50727.42; ASP.NET
Version:2.0.50727.210

"Alexey Smirnov" <alexey.smirnov@.gmail.comwrote in message
news:1181079744.934238.48060@.q66g2000hsg.googlegro ups.com...

Quote:

Originally Posted by

On Jun 5, 11:22 pm, "Sachin" <Sachi...@.Email.comwrote:

Quote:

Originally Posted by

>On both server its .NET 2.0
>>


>
Did you installed the .NET 3.0 on the Server2?
>


re:
!This is what I get at the bottom of the error page.
!Version Information: Microsoft .NET Framework Version: 2.0.50727.42;
!ASP.NET Version:2.0.50727.210

That looks like a W2K3 R2 install on Server2. Is it ?

Is it the same version which is installed on Server1 ?

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
======================================
"Sachin" <SachinGp@.Email.comwrote in message news:uX0uSz7pHHA.3892@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

No.


Quote:

Originally Posted by

This is what I get at the bottom of the error page.
>
Version Information: Microsoft .NET Framework Version: 2.0.50727.42; ASP.NET Version:2.0.50727.210


Quote:

Originally Posted by

"Alexey Smirnov" <alexey.smirnov@.gmail.comwrote in message
news:1181079744.934238.48060@.q66g2000hsg.googlegro ups.com...

Quote:

Originally Posted by

>On Jun 5, 11:22 pm, "Sachin" <Sachi...@.Email.comwrote:

Quote:

Originally Posted by

>>On both server its .NET 2.0
>>>


>>
>Did you installed the .NET 3.0 on the Server2?


On Jun 5, 11:58 pm, "Sachin" <Sachi...@.Email.comwrote:

Quote:

Originally Posted by

No.
>


I don't know what your service does, but Windows Communication
Foundation required .NET 3.0