Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Saturday, March 31, 2012

Strange 100% CPU issue with asp_wp

Hello,
We are having some issues with our .NET web applications. Every so
often a computer will peg its CPU at 100% for some period of time. I am
told anywhere between 30mins and 2 hours. I have seen some kb articles
about asp_wp and 100% but I do not believe that is our issues. I am
fairly certain that the probelm is caused by one of the applications
running on the server. Ok so here are the questions.
Are there any perfmons that can be used to determine which asp.net app
is causing the cpu to spike up?
Is there any code that can be written to see what is happening?
What I am trying to accomplish is to determine the offending
application. What toold exist?
Thanks
RichHi Rich
As for the 100% cpu and troubleshooting on multi-web app server problem.
There are different options which depend on the server's OS version. Is
your webserver win2k server or win2003 server?
If you're using the Win2k server, since the processModel are the fixed
isolation mode. All the web application shared the same workerprocess.
There hasn't any buildin means or tools to determine which app caues the
problem. We have to test them one by one.
However , on win2k3 box, the IIS6 has provided a new workerprocess
isolation model( application pool model) which can let use isolate each web
application in a separate workproesss. You can have a look at the following
reference discussing on this:
#Chapter 20 C Hosting Multiple Web Applications
http://msdn.microsoft.com/library/d...-us/dnnetsec/ht
ml/thcmch20.asp
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 the feedback. This is a W2K server hosting these
applications. So I am left with the testing of individual applications.
Would this testing be done in a traditional manner (ie click and watch)?
If so I was hoping for something a little more than that. Any other
ideas? Thanks
Rich
In article <9LvS$c4eEHA.1600@.cpmsftngxa06.phx.gbl>, you say...
> Hi Rich
> As for the 100% cpu and troubleshooting on multi-web app server problem.
> There are different options which depend on the server's OS version. Is
> your webserver win2k server or win2003 server?
> If you're using the Win2k server, since the processModel are the fixed
> isolation mode. All the web application shared the same workerprocess.
> There hasn't any buildin means or tools to determine which app caues the
> problem. We have to test them one by one.
> However , on win2k3 box, the IIS6 has provided a new workerprocess
> isolation model( application pool model) which can let use isolate each we
b
> application in a separate workproesss. You can have a look at the followin
g
> reference discussing on this:
> #Chapter 20 =3FC Hosting Multiple Web Applications
> http://msdn.microsoft.com/library/d...ft.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 Rich,
Thanks for your followup. As for such problem, if you have found the web
application which cause the problem, I think you'd better continue to
narrow down the problem to some certain web pages or component which may be
the root cause. Also, you can have a check directly in the code logic to
see whether there is any potential issues. Currnetly there're any
particular tools focus on such problem.
In addition, if you still feel on this issue, I recommend that you
request a regular case on it since intensive troubleshooting(such as Dump
analyse) would be done quickly and effectively with direct assistance from
a Microsoft Support Professional through Microsoft Product Support
Services.
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 Steven. I was afraid there would be no way of tracking this
down. If we can't find the app we will contact MPS. Rich
In article <Cvm$ywefEHA.3212@.cpmsftngxa06.phx.gbl>, v-
schang@.online.microsoft.com says...
> Hi Rich,
> Thanks for your followup. As for such problem, if you have found the web
> application which cause the problem, I think you'd better continue to
> narrow down the problem to some certain web pages or component which may b
e
> the root cause. Also, you can have a check directly in the code logic to
> see whether there is any potential issues. Currnetly there're any
> particular tools focus on such problem.
> In addition, if you still feel on this issue, I recommend that yo
u
> request a regular case on it since intensive troubleshooting(such as Dump
> analyse) would be done quickly and effectively with direct assistance from
> a Microsoft Support Professional through Microsoft Product Support
> Services.
> 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
>

Strange 100% CPU issue with asp_wp

Hello,
We are having some issues with our .NET web applications. Every so
often a computer will peg its CPU at 100% for some period of time. I am
told anywhere between 30mins and 2 hours. I have seen some kb articles
about asp_wp and 100% but I do not believe that is our issues. I am
fairly certain that the probelm is caused by one of the applications
running on the server. Ok so here are the questions.

Are there any perfmons that can be used to determine which asp.net app
is causing the cpu to spike up?

Is there any code that can be written to see what is happening?

What I am trying to accomplish is to determine the offending
application. What toold exist?

Thanks

RichHi Rich

As for the 100% cpu and troubleshooting on multi-web app server problem.
There are different options which depend on the server's OS version. Is
your webserver win2k server or win2003 server?

If you're using the Win2k server, since the processModel are the fixed
isolation mode. All the web application shared the same workerprocess.
There hasn't any buildin means or tools to determine which app caues the
problem. We have to test them one by one.

However , on win2k3 box, the IIS6 has provided a new workerprocess
isolation model( application pool model) which can let use isolate each web
application in a separate workproesss. You can have a look at the following
reference discussing on this:

#Chapter 20 C Hosting Multiple Web Applications
http://msdn.microsoft.com/library/d...-us/dnnetsec/ht
ml/thcmch20.asp

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 the feedback. This is a W2K server hosting these
applications. So I am left with the testing of individual applications.
Would this testing be done in a traditional manner (ie click and watch)?
If so I was hoping for something a little more than that. Any other
ideas? Thanks

Rich

In article <9LvS$c4eEHA.1600@.cpmsftngxa06.phx.gbl>, you say...
> Hi Rich
> As for the 100% cpu and troubleshooting on multi-web app server problem.
> There are different options which depend on the server's OS version. Is
> your webserver win2k server or win2003 server?
> If you're using the Win2k server, since the processModel are the fixed
> isolation mode. All the web application shared the same workerprocess.
> There hasn't any buildin means or tools to determine which app caues the
> problem. We have to test them one by one.
> However , on win2k3 box, the IIS6 has provided a new workerprocess
> isolation model( application pool model) which can let use isolate each web
> application in a separate workproesss. You can have a look at the following
> reference discussing on this:
> #Chapter 20 =3FC Hosting Multiple Web Applications
> http://msdn.microsoft.com/library/d...-us/dnnetsec/ht
> ml/thcmch20.asp
>
> 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 Rich,

Thanks for your followup. As for such problem, if you have found the web
application which cause the problem, I think you'd better continue to
narrow down the problem to some certain web pages or component which may be
the root cause. Also, you can have a check directly in the code logic to
see whether there is any potential issues. Currnetly there're any
particular tools focus on such problem.
In addition, if you still feel confused on this issue, I recommend that you
request a regular case on it since intensive troubleshooting(such as Dump
analyse) would be done quickly and effectively with direct assistance from
a Microsoft Support Professional through Microsoft Product Support
Services.

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 Steven. I was afraid there would be no way of tracking this
down. If we can't find the app we will contact MPS. Rich

In article <Cvm$ywefEHA.3212@.cpmsftngxa06.phx.gbl>, v-
schang@.online.microsoft.com says...
> Hi Rich,
> Thanks for your followup. As for such problem, if you have found the web
> application which cause the problem, I think you'd better continue to
> narrow down the problem to some certain web pages or component which may be
> the root cause. Also, you can have a check directly in the code logic to
> see whether there is any potential issues. Currnetly there're any
> particular tools focus on such problem.
> In addition, if you still feel confused on this issue, I recommend that you
> request a regular case on it since intensive troubleshooting(such as Dump
> analyse) would be done quickly and effectively with direct assistance from
> a Microsoft Support Professional through Microsoft Product Support
> Services.
> 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
>

Strange behavior with activate user in windows 2003 server

Hi,

I code an activate user process who works very great on my computer but when i put it on my server (win server 2003 / SQL server 2005) it doesn't validate (isapproved=true) the user.

Activate.aspx.vb :

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim UserNameEmail As String = Request.QueryString("useremail")
Dim Username As String = Membership.GetUserNameByEmail(UserNameEmail)

If Not String.IsNullOrEmpty(UserNameEmail) Then
Dim usr As MembershipUser = Membership.GetUser(Username)
If Not Nothing Is usr Then
usr.IsApproved = True
Membership.UpdateUser(usr)
Response.Redirect("activate_success.aspx")
Else
Response.Redirect("activate_error.aspx")
End If
Else
Response.Redirect("activate_error.aspx")
End If
Else
Response.Redirect("activate_error.aspx")
End If
End Sub


I don't know why? Someone have an idea please?

Hi,

I need to mention that if i use the UserID for the activation it works:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim UserName As String = Request.Params("USERID")
Dim providerUserKey As Guid = New Guid(UserName)

If Not String.IsNullOrEmpty(UserName) Then
Dim usr As MembershipUser = Membership.GetUser(providerUserKey)
If Not Nothing Is usr Then
usr.IsApproved = True
Membership.UpdateUser(usr)
Response.Redirect("activate_success.aspx")
Else
Response.Redirect("activate_error.aspx")
End If
Else
Response.Redirect("activate_error.aspx")
End If
Else
Response.Redirect("activate_error.aspx")
End If
End Sub

But i want to activate the user with passing only his email and not his UserID because USerID is too confidential...


Ok i understand why it is not working...

Many users can have the same email so the database doesn't know which user to pick...

I will think of that...

Saturday, March 24, 2012

Strange error in Asp.Net 2.0

Hello,

I created a web site, using VS2005 and Asp.Net 2.0, which is working fine in my computer.
I then compiled the web site and uploaded it to my server.

Everything works fine but I can't access to a page: News.aspx. I get the 500 browser error!
This page works fine in my computer and I can't find anything else different in it then in othe pages.

The error I get is:

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

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +59
System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) +65

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

Does anyone has any idea of what is going on here?

I allready tried everything I could think of.

Thanks,
MiguelSeen this error more than once. Actually your hosting company has a different security than your computer, look at the News.aspx, are you trying to write or read something from a file? What are you doing different? You can normally override that on the web.config, post the code behind on News.aspx.cs and I may be able to help you finding out what could be doing that.

The issue is MOST DEFINITELY an issue with your web host, although it's not an issue, more of their settings and what they allow, and it's clearly said in the error when it says

"Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file."

Not really sure where the question there is.. whatever you are trying to do is locked down by your host....this topic at the host i use has some good info on "medium trust"

good luck...


albertpascual:

Seen this error more than once. Actually your hosting company has a different security than your computer, look at the News.aspx, are you trying to write or read something from a file? What are you doing different? You can normally override that on the web.config, post the code behind on News.aspx.cs and I may be able to help you finding out what could be doing that.

That is the strange thing. I am not doing nothing more then usual.

Well, the only thing that might be different would be:

Dim from As String =CType(Web.Configuration.WebConfigurationManager.GetWebApplicationSection("system.net/mailSettings/smtp"),Net.Configuration.SmtpSection).From

In this web site I am working in VB.

Here is the code behind:

' -- [Classes] --------------

' News
Partial Class News
Inherits _BaseMaster

' -- [Page] --------------

Sub Page_PreInit(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.PreInit

' -- [Controls SkinIds] --------------

End Sub

Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Init

End Sub

Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim from As String = CType(Web.Configuration.WebConfigurationManager.GetWebApplicationSection("system.net/mailSettings/smtp"), Net.Configuration.SmtpSection).From

End Sub

' -- [Functions] --------------

Private Sub article_DataBinding()

' Display news article
If Not String.IsNullOrEmpty(HttpContext.Current.Request.QueryString("ArticleId")) Then

' Create by27aNews article
Dim by27aNews As New Article

' Define by27aNews properties
With by27aNews
.ConnectionString = ConfigurationManager.ConnectionStrings("dbAccess_JaquelineRoxoAtelier").ConnectionString
.Culture = System.Threading.Thread.CurrentThread.CurrentCulture.ToString()
.Id = Request.QueryString("ArticleId")
.Query = "web_News_SELECT_One"
.Load()
End With

' Create and format article's publication date
Dim articlePubDate As String = DateTime.Parse(by27aNews.PubDate).ToString(Resources.FormatString.DateTime_Full)
articlePubDate = Left(articlePubDate, 1).ToUpper & Right(articlePubDate, Len(articlePubDate) - 1)

' Bind article image
With iArticle
.AlternateText = by27aNews.Title
.ImageUrl = "~/Assets_Content/News/" & System.Threading.Thread.CurrentThread.CurrentCulture.ToString() & "/Images/" & by27aNews.Image
.ToolTip = by27aNews.Title
End With

' Bind article label
With lArticle
.Text = "<h1>" & by27aNews.Title & "</h1>" & _
"<p class=""pubDate"">" & articlePubDate & "</p>" & _
"<p class=""description"">" & by27aNews.Description & "</p>" & _
"<p class=""author"">" & by27aNews.Author.Split(New Char() {"(", ")"})(1) & "</p>"
End With

End If

End Sub

' -- [ASP.Net Controls] --------------

' ASP.Net Image | <Asp:Image
Private Sub iArticle_Init(ByVal sender As Object, ByVal e As EventArgs) Handles iArticle.Init

' Define iArticle properties
With iArticle
.CssClass = "iArticle"
.ImageAlign = ImageAlign.Right
End With

End Sub

' ASP.Net Label | <Asp:Label
Private Sub lArticle_Init(ByVal sender As Object, ByVal e As EventArgs) Handles lArticle.Init

' Define lArticle properties
With lArticle
.CssClass = "lArticle"
End With

End Sub

End Class

Thanks,

Miguel


Looks like you found it yourself, I bet you don't have access to that: Dim from As String = CType(Web.Configuration.WebConfigurationManager.GetWebApplicationSection("system.net/mailSettings/smtp"), Net.Configuration.SmtpSection).From

Take it out, re-publish and test it, if it works without, then go to your hosting company and send them a WTF emailSmile

Let me know

Strange Error with urlMappings

Hello

In my computer (XP Pro Sp2, IIS5), when I built my web application : it's work

but when I built in my server 2003, the mappings don't work.

I don't understand why ?

<urlMappings enabled="true">
<add url="~/index.html" mappedUrl="~/Default.aspx" />
</urlMappings


Hello!
I haveexactly the same problem but I'm running on win2000 server.
When I run the site with ctrl-F5 it runs perfectly, all mappings arecorrect, when I upload it to my server the mappings seem to be ignored,just 404 all the time.
Does anyone know?
Best regards,
Peter Larsson


Did you guys figure out a solution ? I just started using urlmappings
Yes, as it turned out I had to execute .html pages through the aspx-dll as well, then it worked like a charm, you change it in the IIS settings.

/P