.net - Cassini (VS WebDev) Executing BeginRequest And EndRequest On Different Threads?

Dec 17, 2010

I'm debugging an ASP.NET MVC 2 application running on .NET 4.0 (Windows 7), currently inside of Cassini, the Visual Studio Debugging Web Server.All was running well, when I suddenly was having exceptions in my Application.EndRequest handler. After investigating into this issue, I found the reason was that Cassini was calling EndRequest on a different thread than BeginRequest (then, a ThreadStatic variable which was set in BeginRequest and used in the EndRequest handler was null, since on this thread, BeginRequest was never called).What could be the reason for Cassini to execute BeginRequest and EndRequest on different threads?I know the reason could be an 'Async' Page directive (see Do ASP.NET Requests always BeginRequest and EndRequest on the same thread? , but I have no 'Async' attribute in my Page directives).

View 1 Replies


Similar Messages:

.NET Requests Always BeginRequest And EndRequest On The Same Thread?

Sep 5, 2010

Does BeginRequest and EndRequest for an ASP.NET HttpApplication always occur on the exact same thread for a given HTTP request from a client?The reason I ask is that I am seeing some very strange behavior where a ThreadStatic variable is not null inside of an Init method for an IHttpModule. I set this ThreadStatic variable to a value on BeginRequest and null it on EndRequest.

However, my IHttpModule Init method should be called outside of the BeginRequest/EndRequest period, so the only way I can think of that this ThreadStatic variable would have a value when my Init method is called is if EndRequest occurs on a different thread than BeginRequest and thus the value is still not null later on when ASP .NET tries to use that same thread to create a new HttpApplication instance...

I am running IIS 7 in integrated mode.

View 2 Replies

JQuery :: BeginRequest And EndRequest Function Not Working Anymore

Jan 25, 2011

Are beginRequest and endRequest working while sending and retrieving data with jquery? In my observation these functions (see below) are not working anymore. Is this because it's not a real postback?

function pageLoad(sender, args) {
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);
}

View 1 Replies

.net - IIS And WebDev Server ?

Oct 13, 2010

i wrote code, and it worked fine on webdev server in vs2010.i hosted it on remote iis, because, my windows 7 home basic doesnt have iis, and almost all code fails,so i had to rewrite it with using helpers for links, ResolveUrl and many other functions.So here is the question, how can i host application, while debugging, not on webdev or local iis, but on remote iis, automatically?

View 1 Replies

C# - Remove All EndRequest Handlers In PageRequestManager?

Oct 4, 2010

How to remove all endRequest handlers in PageRequestManager?

View 1 Replies

.net - EndRequest Not Fired On IIS When Resource Is Missing?

Feb 2, 2010

I have a HttpModule that hooks on the EndRequest Event on a IIS6 with a wildcard handler registered and it works fine as long as the request ends on a .aspx page, but NOT if the url is missing (404).I guess it's because of the staticfilehandler ends the request, but is there any good solution for this problem ?I have tried the same solution in IIS7 (pipeline mode) and there it works fine.

View 1 Replies

VS 2010 Force The Webdev To Apply Changes To The Css?

Mar 7, 2011

I´m using a template that comes with visual web developer 2010. It uses a css style sheet.

After several weeks of frustration I figured out that changes to the stylesheet doesn´t take effect until I reboot the computer. Not the webdeveloper, but the computer(!). This cannot possibly be right, can it? How do I force the webdev to apply changes to the css?

View 7 Replies

How To Get Method Begin Request&EndRequest In UpdatePanel (in Jquery)

Mar 11, 2011

how get Method Begin Request&EndRequest In UpdatePanel?(in jquery)

function onBeginRequest()
{
//$.blockui;
}

function onEndRequest()
{
//$.unblockui;
}

View 1 Replies

Visual Studio :: WebDev.WebServer20.exe Has Stopped Working

Jul 28, 2010

Using VS2010 Pro, I started up an web site and got the message "WebDev.WebServer20.exe has stopped working" - a very similar problem was reported at

[URL]

I checked C:WINDOWSassembly and found that System 2.0.0.0 was missing (again!), reinstalled it but still got

""
System.ArgumentOutOfRangeException was unhandled

View 4 Replies

Visual Studio :: How To Change The Location Of WebDev.WebServer.exe

Jul 1, 2010

Currently this is the location of my WebDev.WebServer.exe -> C:Program Files (x86)Common FilesMicrosoft SharedDevServer9.0WebDev.WebServer.exe

I want to change it to -> C:Program Files x86Common FilesMicrosoft SharedDevServer9.0WebDev.WebServer.exe

Notice that the new location has no parentheses (because this might be the cause of an oracle connection problem I'm having (using Oracle.DataAccess))

I'm guessing simply moving it to the new destination will cause some problems, so what will I need to do to the Visual Studio 2008 configuration?

View 2 Replies

Can Put Code In The BeginRequest Handler To Check Whether Any Such Tasks Are Due

Mar 23, 2011

I am writing a quick-and-dirty in-house ASP.NET application that needs to be able to run a task after a specific period of time. If it was a proper application, I'd probably use a windows service but I don't really want to bother with the extra complexity of that.I could put code in the BeginRequest handler to check whether any such tasks are due, but of course nothing would happen if nobody is using the application.at the moment the best option I can think of is something like ShellExecute("nohup sleep 1000; wget http://server/dummypage.aspx") (if you'll excuse the mixed windows/unix nomenclature).

View 2 Replies

MVC :: BeginRequest Event Fires For All Static Files?

Oct 29, 2010

I was under the impression that static files (CSS, images, @font-face files, etc) bypassed ASP.NET completely, and were served directly by IIS. However, my BeginRequest event handler is being called for every HTTP request, including those for static files. This concerns me because I'm creating an Entity Framework data context to be used for the lifetime of each request in that event handler. I don't want to create those contexts if they're never going to be used.

I'm using IIS 7 on Windows 7 Ultimate with so special handler mappings defined. Do I have it wrong? Should these events be firing?

View 2 Replies

.net - Using Http Module For Authorization AuthorizeRequest Or BeginRequest?

May 26, 2010

I have a wap site with susciription and I want to check if users are authorized to see some pages. I have decided to use http module. Should I use AuthorizeRequest or BeginRequest to check the users status? and why?

View 2 Replies

Application Works On Cassini But Not In IIS On Xp?

Sep 8, 2010

App works fine in IIS on Windows 7 on my dev machine. Trying to debug on a client machine running XP and VS2008 and the app works ok running on Cassini, however when I select IIS I am getting a 403 forbidden error. Anonymous access is switched on in ISS. Can anyone help work out why it won't work in IIS?

View 2 Replies

Web Forms :: URL Routing & PostBack Not Firing BeginRequest Event

Sep 13, 2010

we are having some weird issues with URL Routing in ASP.NET 3.5.

We have a search box that does a search and redirects to a routed URL.

When we search for the first time (aka Press a button that forces a postback) everythign works as expected. we get:

1. BeginRequest event.

2. Determines Route

3. Calls Routehandler to match the route item to the actual destination page

4. Routes the url appropriately.

After you do one search successfully and try again it fails to call the BeginRequest event. Because of this the routing data never gets called and so the url is never routed to its correct destination. What is weirder still if we append a "/" (trailing slash) to the url after the initial postback it DOES work properly again.

So our search route looks like this

mydomain.com/Search

entering a term and pressing the SEARCH button would yield a result url like this:

mydomain.com/Search/Results/MySearchTerm

Going back (after 1 successful search) you then need to use this url or else BeginRequest will never fire:

mydomain.com/Search/ < (note the extra "/" at the end)

why the BeginRequest event never fires unless the slash is appended?

View 1 Replies

Web Forms :: Application BeginRequest Event Raised Too Often To Handle It?

May 6, 2010

I'm developing IP Blacklisting HttpModule in asp .net application and I found one very annoying thing. Each request to the asp net page generates tens of "subrequests" to application resources like images, client side scripts, styles etc.

Now in my application I'm listing to the BeginRequest event and when it is fired I'm loading Dictionary with blacklisted IPs from application cache and check user's IP against it. I've made a simple log of what is actualy happening during each page view, here are the results:

[Code]....

As you see, one request to Login page causes BeginRequest to fire 18 times, there is 18 dictionary loads, 18 lookups etc. That's not the way I want it to be.

Is there any other event that is raised only once per each request? Where do you place the blacklisting mechanism in your applications? I know I can do it through ISAPI filter, but the catch is, this site is on the shared hosting and I'm not sure I can use it on their IIS. Also I'm not sure if ISAPI filter can access some piece of cache with this blacklist (I don't want to load it from DB on each request, that's obvious).

View 3 Replies

AJAX :: JavaScript Function EndRequest(sender, Args) Is Not Work After Finish The Loading

Mar 30, 2010

i would like to use script manager and update panel in different domain to accommodate an other domain web site inside a iframe, but it prompts me a an error alert box (An error has occurred in this dialog. Error: 54 Permission Denied), may i know why?

Is that any solution to solve the problem?

Secondly, in the different domain, the JavaScript function EndRequest(sender, args) is not work after finish the loading whereas the InitializeRequest(sender, args) is work. May i know why?

View 2 Replies

Monitoring SQL Statements Application-side By Attaching To W3wp/WebDev.WebServer.exe?

Dec 1, 2010

Oracle has simple, useful and free tools for attaching to a process and monitoring its SQL statements but I can't anything similar for SQL Server. This is incredibly useful across a number of scenarios, particularly when dealing with third-party assemblies (1). ANTS 6 seems to support something like this (2), though it doesn't allow you to view the stack-trace that lead to the query as dynaTrace does. I don't think dotTrace tracks parameter values, either.

Surely there's a widely available option for profiling SQL application-side?

(1) -

[URL]

(2) -

[URL]

View 1 Replies

Visual Studio :: Limiting Webdev.webserver Bandwidth For Stress Testing?

Jul 25, 2010

I wantto make a slower transmitting/transferring data speed for debugging issues.(no threading sleep is not my answer) searching a way to limit webdev.webserver speed (bandwidth) ?

for example maybe checking on "custom web server=webdev.webserver /BandwidthLimit=128bs"

View 1 Replies

How To Compare IIS & Cassini As Production Servers

Jan 1, 2010

I have an ASP.NET website which is running currently on IIS. Now I want to move that site to run on Cassini.

What are the advantages of Cassini over IIS? What are its disadvantages?

What are your experiences using Cassini as a production web-server?

View 5 Replies

Test Pages With Web Services When Cassini Available?

May 18, 2010

I'm developing a web site in a high-security environment. For example, we use CAC cards to authenticate users over SSL. The site is a mix of VB.NET and C# on .NET 3.5 with some AJAX. The AJAX parts are now calling web services for things like Cascading Drop Down Lists. We've been running VS2008 configured on our local PCs to use IIS instead of the default server (Cassini). However, some security policies were rolled out to the desktops over the weekend and, suddenly, we're not allowed to run IIS on our PCs anymore. I already have some of our IT people trying to appeal for waivers for developers. In the meantime, I need to find a way to keep developing. If I turn off the SSL requirement to the 'secure' part of the application (locally, my PC only) I can serve up some of the pages (using Cassini) when I hit "F5", but pages with web services just bring up "server application unavailable". I need to be able to add some more functions into the existing web services, among other things, so the ability to single-step through the code is still a necessity. I'm sure someone who is limited to using Cassini has found a way to Build/Debug pages in VS2008 when webservices are involved. As it turns out, some links had "HTTPS://" hard-coded in them (I inherited these). Changing the link to "~folderpage.aspx" allowed Cassini to properly serve things up.

View 2 Replies

Monitoring Traffic To Cassini On Localhost?

Jul 22, 2010

I'm experiencing some really odd timeout issues when running a ASP.NET 2.0 project on Cassini on localhost, and I don't have enough data to get a clue of what's going on.

Is there a way to monitor localhost traffic to Cassini, either using some specific development tool or a general-purpose monitoring app such as fiddler?

Just to pre-empt some answers I'm already aware of:

Normally I can use the well-known dot-hack for using fiddler to monitor localhost traffic, but with Cassini I get the following error message in the browser:

[Fiddler] Connection to localhost. failed. Exception Text: No connection could be made because the target machine actively refused it ::1:3213

Fiddler also listens to localhost on http://ipv4.fiddler:port, and I can intercept the traffic. But when I do this the timeout issues don't occur!

Edit: Oops. This question had already been asked... Twice.. Didn't come up on search or . The solution found in the second thread is to use the dot-hack with ip-address (http://127.0.0.1.:port/ instead of "localhost". This question may be closed.

View 3 Replies

Visual Studio :: Error - "WebDev.WebServer.exe Has Encountered A Problem And Needs To Close?

Jul 13, 2010

I have running my application. some error is displayed at every time. what is the meaning of this error

"WebDev.WebServer.exe has encountered a problem and needs to close.we are sorry for the inconvience. If you were in the middle of something , the information you were working on might be lost. "

View 1 Replies

Using Authentication / Authorization With Cassini Development Server?

Mar 7, 2011

I've just run into one of the problems of using the integrated dev server (Cassini) in VS and would like to see if there are any solutions.We're using asp.net authentication to secure the site. However, Cassini runs in integrated pipeline mode, meaning that requests for all files go through the asp.net isapi. The result of this is that it's securing files that would otherwise not be secured in a production environment (.htm .js .css etc..).

Now I understand that we can run the project on a local IIS instance, but we would like to avoid this if possible. But, because of the problem above, this is looking like the only solution.Does anybody have any ideas about how to get Cassini working with authentication that can be easily moved to a production environment when ready. (I'd also like to avoid having a different development web.config that specifically allows access to these files).

View 2 Replies

Visual Studio :: Cassini Vs IIS Performance Comparison?

Feb 28, 2011

anybody comment on the differences between IIS & Cassini in terms of performance and memory consumption?am using VS 2010 on a Windows XP SP2 developing a silverlight app.My machine has a 3 GB DDR2 RAM but still debugging is a pain and cassini keeps on crashing and I need to restart my machine 3-4times a day which is a considerable loss of productivity.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved