Iis7 - Script Combiner Returns Blank Response At Times?

Jul 14, 2010

I am using a script manager for ASP.NET MVC to combine and compact CSS files and JavaScript files for pages on a website. For the most part this works as expected, however there are times (couple of times per week) when the HTTP handler responsible for returning the content returns an empty response and so pages load without any CSS - the HTML returns and the images load as well. When this happens, refreshing the page does not resolve the problem, while resetting IIS always resolves the problem. Also, without resetting IIS, after some time the problem stops.

Normally the script handler logs errors, however there are no errors logged during the issue. It seems as if the handler is never invoked. There are no failed request logs generated by IIS.

I monitored resource usage when this was happening and did not notice anything out of the ordinary. The web server is running IIS 7 and has low CPU usage. I increased some parameters in IIS settings regarding the number of allowable requests to process, the problem still exists though perhaps less frequent. The website receives about 1.5 million pageviews monthly.

View 1 Replies


Similar Messages:

C# - Roles.GetRolesForUser(); Returns Blank?

Dec 18, 2010

using asp.net membership api when I call Roles.GetRolesForUser(); it returns nothing. When I make a call Roles.GetAllRoles() all the roles are returned. What is the problem? Also what is the correct way to authenticate users using the membership api?

View 2 Replies

WCF / ASMX :: WCF Service Returns Blank Data?

Jul 22, 2010

I'm new to WCF and this is definitely a rookie question. Why does my browser show/return nothing when I type this URL: http://localhost/service.svc/root, using the code below. I was hoping I would see an xml respone like: <double>56.78</double>. service.svc

--------------------------------------------------------------------------------------

<%@ ServiceHost Language="C#" Service="EssentialWCF.StockService" %>
using System;
using System.ServiceModel;
using System.ServiceModel.Web;

[code]...

View 6 Replies

SQL Reporting :: Blank Reports Are Displayed When Running The Project Through IIS7?

Nov 6, 2010

i have one problem in executing the ssrs reports..

i've developed one project for that project there are some SSRS reports which are deployed

in path ( "http://localhost/reports/") it is working fine...

when i run through the project and press F5 ( i.e execute) the reports

are displaying correct with full of content in that...

now i want to host that project.. so i've created one virtual folder named as proj in IIS7..

and i've assigned the project to that..

when i execute from IE7 and type the path http://localhost/proj then the main page is displayed

and when i click the button print then it is showing the empyt report with only the toolbar above

no content are there in reports ...

but when the run the project i.e F5 then the report is displayed with full of content...

View 1 Replies

.net Drawing.Graphics.FromImage() Returns Blank Black Image?

Jun 2, 2010

I'm trying to rescale uploaded jpeg in asp.netSo I go:

Image original = Image.FromStream(myPostedFile.InputStream);
int w=original.Width, h=original.Height;
using(Graphics g = Graphics.FromImage(original))
{

[code]...

View 2 Replies

Security :: Forms Authentication - Username Utilizing The User Prinicipal, But It Just Returns Blank?

Jan 25, 2010

Ok, I almost hate to ask this because I'm sure it's been covered many times on this forum, but I'm starting to get too frustrated trying to get it to work, so I'm gonna ask anyway.I have setup forms authentication on my site and have it working without any issues. What I'm trying to do now is to add "Remember Me" functionality so that the users don't have to log in each time they access the site. I'm able to get the authentication part down, but the issue I'm having is that when the user logs in, I set certain attributes in Session variables for that user (name, site role, etc.). These values are obtained from a database after the user has been authenticated, based on the username. What I'm having problems with is getting at this username from the FormsAuthentication cookie.

After I authenticate the first time, I setup my cookie this way:

[Code]....

I have tried getting at the Username utilizing the User prinicipal, but it just returns blank.

View 2 Replies

State Management :: Using A Cms Product To cache Every Page - Get Quick Response Times?

Jun 4, 2010

I am using a cms product that likes to cache every page so that you get quick response times. The downside of that is that pages can get stale. My question is: are there different caches per user? Does asp.net keep track of caches on a per user per site basis? That's what is seems like to me, but I can't seem to find it documented anywhere. With this cms, they have a load of hashtables keeping tabs on the modified pages. If you clear out the cache, log out, and log back in again as another user, you still have stale information. The only way to get the information to be current for all users is to recycle the app pool, which is something you don't want to do too often ( kinda like pulling the emergency brake on the train ).

View 2 Replies

Web Forms :: IIS7 Response.OutputStream Does Not Work In IE7?

Apr 2, 2010

The application is hosted in Windows Server 2008 with IIS7.

I have a button that calls a new webpage (asp.net page, ext .aspx) that contains

Response.OutputStream.Write(blahblahblah) which then should prompt a download box to allow user to save an image.

Now the page basically creates a stream and then is supposed to output the stream to the user using Response.Outputstream.Write.

Then the user is supposed to be prompted to open or save the document. This works fine in Firefox but it does not work with IE7 or 8

Also this exact same code works with IIS6 on a Windows 2003 server.

So the only differences is the IIS6 and Windows 2003 Server to IIS7 and Windows 2008 Server.

And what happens is when I clicked the button, the page did pop up but disappear 1-2 seconds later without
prompting the download box to the user.

Here is the code that launches for Reference

//e.g file = 123424_43535.jpeg
FileInfo myFile = new FileInfo(Server.MapPath("mapImage/") + file;
using(var fs = myFile.Open(FileMode.Open, FileAccess.Read))
{
byte[] buffer;
int read;
buffer = new byte[(int)fs.Length];
Response.AddHeader("Content-Disposition", "attachment;filename=" + file);
Response.ContentType = "application/x-force-download";
Response.AddHeader("Connection", "Keep-Alive");
Response.AddHeader("Content-Length", fs.Length.ToString());
while((read = fs.Read(buffer, 0, buffer.Length)) > 0)
{
this.Response.OutputStream.Write(buffer, 0, read);
}
}
Response.End();

I have tried to replace Response.AddHeader with Response.AppendHeader, however the result is still the same. Also, I have tried to replace the Response.ContentType with application/octet-stream and image/jpeg, I also faced the same result.

Is there any setting/modification on server/code that I need to look on?

View 13 Replies

Deriving Controller From A BaseController, Then Action Methods Do Not Execute And Response Is Blank

Mar 20, 2011

I wanted to create a CurrentUser object to be accessible in every Action of Controller, I initialized it in Constructor but User.Identity was not available in Constructor. I followed the following link on stackoverflow:

Defining a User with User.Identity.Name in controller constructor

But after inheriting my Controllers from BaseController, my Action methods are not even executed, the execution stops at Execute of BaseController and I get blank pages in the browser.

View 1 Replies

C# - Can Get The Message/response Body In WCF When Server Returns An HTTP 401

Jan 12, 2010

I have a WCF client test harness where I'm using a "client message inspector" endpoint behavior to "pick off" raw requests and response messages going to and from a service and save them for later display in the UI.

This works great, except for the use case where invalid credentials are passed (Basic Authentication). The server returns an HTTP 401 along with a SOAP fault in the body containing details of what happened. I have no control over the service, so this behavior cannot be changed.

Because the HTTP 401 is returned as a WebException, my message inspector never fires and I can't get to the raw response. This exception eventually gets to the UI in the form a MessageSecurityException.

Is there any way to suppress this so the message inspector's AfterReceiveReply still fires? or is there somewhere else I can access the entire raw response?

View 1 Replies

Changing Response Type In Aspx Page Breaks In IIS7?

Mar 3, 2010

I have a custom implementation of Application_PreRequestHandlerExecute which is applying a deflate/gzip filter to the response. However, on IIS7, this is failing on my "script generator" pages. These aspx pages take in Query String values and return a custom bit of script, changing the response type to text/javascript. I think it is failing because of the way iis7 uses mime types, but I'm unsure how to fix it short of turning all compressio off.

View 1 Replies

Server.TransferRequest Returns Blank Page On Specific Server?

Jun 17, 2010

I have a webapplication based on MonoRail, where we utilize the routing feature from MonoRail. On the first request after the application has started, the routing isn't initialized. To circumvent this, I have the following code in Application_OnError():

public virtual void Application_OnError()
{
if ( // identified as routing error )
Server.TransferRequest( Context.Request.RawUrl, false );
return;
}

Problem beeing that on our development server (which runs server 2008 R2, with IIS 7.5 and .NET 3.5) returns a blank page without headers, but on my workstation (which runs win7, IIS 7.5 and .NET 3.5) it works fine.

What could be the cause of this? If the code in Application_OnError() throws an exception, what would be the expected output?

I have verified the following:

The access-log shows one entry, I'm not sure if a TransferRequest would show up as a second entry when invoked successfullyThe application actually do some work according to my internal logs, and it doesn't die since a subsequent requests works flawlessly (because routing will be active)

View 4 Replies

Security :: Access Denied Error With Response.writefile Of UNC File In IIS7. Bug?

Mar 5, 2010

I'm moving applications from IIS6 to IIS7.5 (win 7 an win server 2008 r2), when 2 applications (with identity impersonate) try to get a file with response.writefile only from a UNC path i'll get "access denied". In IIS6 and Visual Studio Developer Web Server, same code works. I can save file with FilePath.SaveAs and get name and length with FileInfo, but not download. After 2 days of nightmares I have tried to change

Response.WriteFile(filePath)

to

Response.BinaryWrite(File.ReadAllBytes(filePath))

and now work. My question is: can I have a microsoft developer to sacrificate for my avenge?)

View 2 Replies

Web Forms :: Response.Redirect With Frame Work 4.0 / No Longer Funchtions And Returns

May 21, 2010

We have an aplication which works fine withing ASP 2.0 .NET Framework 3.5. Its a response. redirect call from inside ajax update panel, and it can not be outside. After updating to Framework 4.0 it no longer funchtions and returns "Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed." without redirecting.

Server.trasfer gves the same error as well as and does not work

View 2 Replies

WCF / ASMX :: Accessing Response Of HttpWebRequest, Even When Request Returns 500 Internal Server Error

Oct 22, 2010

Hoping someone can point me to a solution, haven't been able to find one yet.

I'm using the standard way for send HttpWebRequest

[Code]....

As you can see from Fiddler/SOAPUI it does return the SOAP fault, however using HttpWebRequest i can't capture the response.

Returning 500 triggers my exception handling and Capturing the WebException doesn't expose the response.

Does anyone know how to capture this response xml in the case of 500 Internal Server Errors.

View 1 Replies

Why Can't The "Server" Response Header Be Removed Via Web.config In IIS7

Sep 9, 2010

[URL]I know how to remove the Server response header with an HTTP Module based on the link above. I just want to know why it is necessary to remove it this way.

View 3 Replies

C# - Web Service Method Returns Response Object Instead Of Custom Object?

Sep 29, 2010

I have the following code:

[WebMethod]
[SoapHeader("_webServiceAuth")]
public User GetUser(string username){
try
{
this._validationMethods.Validate(_webServiceAuth);
User user = new User(username);
[code]...

View 1 Replies

C# - MVC - Blank Model Not Returning Blank Data

Jun 2, 2010

I have a form which a user can fill in x times with the data they want too. The form is posted to the following Action.

[HttpPost]
public ActionResult Manage(ProductOptionModel DataToAdd)
{
if (!ModelState.IsValid)
{
return View(DataToAdd);
}
var ProdServ = new ProductService();
if (DataToAdd.ID != 0)
{
//Edit Mode.
DataToAdd = ProdServ.EditProductOption(DataToAdd);
ViewData["Message"] = "Option Changes Made";
}else
{
//Add
DataToAdd = ProdServ.AddProductOption(DataToAdd);
ViewData["Message"] = "New Option Added";
}
var RetModel = new ProductOptionModel() {ProductID = DataToAdd.ProductID};
return View(RetModel);
}

So at the bottom I blank the model (Leaving just the required field) and then return to the view. However the view holds the data from the previously submitted form. I have debugged the code and checked that the RetModel variable is empty.

View 2 Replies

Web Forms :: Difference Between Response.Expire And Response.ExpiresAbsolute?

Mar 3, 2010

I am not able tto understand the differnce between REspose.Expire and Response.ExpiresAbsolute?

Is it mandatory to use both toghter?

View 4 Replies

Response Object / Response.AddHeader Is Used To Add A New HTML Header?

Jul 16, 2010

[Code]....

I am using this code to download and its working well for me.But i cant understand the code.Can someone explain me this code to me please?

Response.AddHeader is used to add a new HTML header,but what is an HTML header all about?and the parameters i am passing within it as the name and value;what are they?

View 3 Replies

Web Forms :: Response.Flush() | Response.Buffer = False: Neither Do Anything?

Sep 20, 2010

So,I have this code:

[Code]...

Even though I have buffer set to false,no text is displayed.I have tried adding a response.flush,with and without changing the buffer value.What exactly is wrong?I've also tried it with and without the label(i.e. with or without just Response.Write)

View 2 Replies

MVC :: Response.End And Filters / Can Get Response.End() To Work When Called

Nov 19, 2010

I have a static method that I use to control REST styled HTTP codes when my mvc application encounters an exception.

The method looks like:

[Code]....

This is static becuase then I can call it within an action or inside a filter. The problem I am having is that when I call RaiseException inside a filter, it stills goes into the requested action. Response.End() doesn't seem to have any effect. Any clues on how I can get Response.End() to work when called?

View 19 Replies

Necessary To Call Response.End() After Response.Redirect(url)?

Jan 13, 2011

Is it necessary to call Response.End() after Response.Redirect(url) Update for all the answers. Because some answers say that it's necessary and others say no, I have searched more and have found in msdn under remarks the following: Redirect calls End which raises a ThreadAbortException exception upon completion.

View 5 Replies

C# - Using Response.Filter With Response.TransmitFile?

Aug 10, 2010

I'm using Response.Filter in order to implement stream compression in accordance with HTTP Request Header Accept-Encoding

Here's the important stuff:

if (AcceptEncoding.Contains("deflate") || AcceptEncoding == "*")
{
HttpApp.Response.Filter = new DeflateStream(PreviousOutputStream, CompressionMode.Compress);
HttpApp.Response.AppendHeader("Content-Encoding", "deflate");
}


By and large this works as intended. However, I'm in a situation where I'm using an ActionResult on an MVC Controller to serve up files to the user agent:

Response.Clear();
Response.Headers["Content-Type"] = contentType;
Response.Headers["Content-Length"] = contentLength;
if (Request.QueryString["dl"] == "1")
{
Response.Headers["Content-Disposition"] = "attachment; filename=" + fileInfo.Name;
}
Response.Flush();
Response.TransmitFile(fileInfo.FullName);

To be more exact, the action method returns new EmptyResult() after the Response.TransmitFile() call. This works exactly as intended without the Response.Filter modification.

In this situation, the response entity reaches the user agent garbled and unintelligible. FireFox's Poster addon shows empty entities or jumbled entities coming back.

View 2 Replies

HttpHandlers / Modules :: Context.Response.Output Vs Context.Response.Write()?

Jan 24, 2010

I have written simple HttpModule. context.Response.Output.Write is working fine. but not context.Response.Write().

View 2 Replies







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