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


Similar Messages:

SQL Server :: How To Replace Specific String Regex With Blank

Jan 11, 2011

In my table below string are present which I have to replace *@*$*86$*$ with blank, how can I do? Here bold can be 0-99, in any row.

xOsyH *@*$*86$*$

M. V. *@*$*81$*$ .

View 8 Replies

Server.TransferRequest Is Not Preserving HttpContext.Items

Sep 13, 2010

I've just updated my ASP.Net code from HttpContext.RewritePath(targetPath) to use the .Net 3.5 function: HttpContext.Server.TransferRequest(targetPath,true)

However, I now no longer have any of the custom HttpContext.Items that I added, before the transfer.

View 1 Replies

POST Form Server-side - Redirect The User To This Blank Page?

Jun 11, 2010

Currently whenever I need to send a request to a payment-gateway, for example, I redirect my page to another page on my website which has a form with several hidden fields. I then pre-populate the values of these fields server-side, and specify in the body tag something like 'onload="form.submit();"'

However, I'm wondering, rather than redirecting to this page, is there anyway that all this data can be collected and POSTed to the payment-gateway server-side?This will cut out the need to redirect the user to this blank page, and make everything a bit more tidy.

View 1 Replies

Web Forms :: JavaScript Alert Message From Server Side Makes Page Blank?

Jun 9, 2013

i have a button,i want when a button is clicked a alert message should be display, i wrote the code like this

protected void btn1_Click(object sender, EventArgs e)
{
Response.Write("<script>alert('Your account has been created')</script>");
}

It work well, but when it pop-up background color become gray,i want when it pop-ups,the background should remain same .

like when we click on button which is associated with confirmbuttonextender..the background become fade but it doesn't go blank..

View 1 Replies

SQL Server :: Want That Whenever User Left This Field Blank From Front End Aspx Page, Null Value Should Be Inserted In This Column From Stored Proc?

Oct 27, 2010

I have a table in sql having a numeric data type column,Now i want that whenever user left this field blank from front end aspx page, null value should be inserted in this column from stored proc.How can i achieve this? Also what kind of data type is most appropriate on front end for such taking kind of value?

View 2 Replies

A Network-related Or Instance-specific Error In SQL Server Management Server?

Mar 13, 2011

I try to login to SQL Server Management Studio, using Windows Authentication and I get the error message:

Cannot connect to L-VAIOsqlexpress.

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

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

View 1 Replies

SQL Server :: Instance-specific Error Occurred While Establishing A Connection To SQL Server?

Jan 25, 2011

I published my web.The problem is that the path to the DataBase is not good and i dont know how to change it.heare is the error:A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

View 4 Replies

SQL Server :: 2008 Connect To A Remote Server - Network - Related Or Instance - Specific Error

Aug 4, 2010

I am using Sql Server 2008 to connect to a Remote Server. Everything was working fine for the last couple of months, and i was successfully connecting to the remote server. Today it suddenly stopped connecting to the remote server. note that i did not alter any configuration settings. Did my isp block Sql Server. My ISP is using ISA SERVER? The error details are:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider) I am using Microsoft Firewall Client For ISA Server for opening ports. But today nothing is working.

View 1 Replies

Custom Server Controls :: Page Cannot Be Null Error, Or Blank Databound Controls

Feb 24, 2011

So I finally managed to create a control which basically shows a bunch of Panels with an extra property. I use it like this:

[Code]....

This renders fine and shows the text in the TabPanel controls. However, when I replace the plain text with something a little more exciting, say an UpdatePanel so it looks like this:

[Code]....

Then I get this weird error:

Page cannot be null. ensure that this operation is being performed in the context of an ASP.NET request.[InvalidOperationException: Page cannot be null. ensure that this operation is being performed in the context of an ASP.NET request.] System.Web.UI.UpdatePanel.get_IPage() +647672 System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +20 SP.adminonly_reports_loginreport_aspx.__RenderTabPanel1(HtmlTextWriter __w, Control parameterContainer) in D:....eport.aspx:37 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115 System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +13 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +42 TabPanels.TabPanelHolder.Render(HtmlTextWriter w) in D:e4Webwwwrootlms_workingTabPanelsTabPanelsTabPanelHolder.vb:146 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +253 System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +87 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Page.Render(HtmlTextWriter writer) +38 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240

If I take out the UpdatePanel and replace it with an ASCX control I made that simply puts database data into some DropDownLists, like this...

[Code]....

Then the page loads, but the data is not loaded into CustomerUserList1, and the dropdownlists within it are all blank. CustomerUserList1 has worked fine for years when used directly in a normal Panel/Page UpdatePanel.

[Code]....

View 5 Replies

SQL Server :: Connection To Sql Server / Error "A Network-related Or Instance-specific Error Occurred While Establishing A Connection To SQL Server

Nov 23, 2010

I just installed sql server 2008 R2 on my computer. I am trying to connect to sql server throught my C# code and everytime I run the C# program,

I get this error "A network-related or instance-specific error occurred while establishing a connection to SQL Server.

The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) "

The connection string that I used in my web.config file is

[Code]....

I am not sure what am I doing wrong, but I followed this article below step by step and still I am getting the same error

http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

My instance name is MSSQLSERVER and the server that I am using is on my local machine and it has my computer name in it.

View 10 Replies

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

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

.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

SQL Server :: Receiving An Error - A Network-related Or Instance-specific Error Occurred While Establishing A Connection To SQL Server

Sep 23, 2010

I've created a small website with a simple sqlite database using vwd 2010 .net 4. In dev and test envionments everything works fine, however when i promote to my hosting provider i receive the following error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I've been configuring the connection strings (autogenerated from entity framework and attached db) but unable to get it working on the hosting provider, I'm assuming it's related to permissions but not entirely sure how to resolve - here's the web.config as it stands:

<add
name="ApplicationServices"
connectionString="data [code].....

For info the environments are set up as follows:

- Dev environment is vwd express 2010 with sqlite mdf attached

- Test environment is windows 7 server, iis 7 with appdomain identity set to network service

View 6 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

SQL Server :: Converting Null To Blank?

Feb 25, 2011

Is there a way to convert nulls in all the fields in a table into blanks using transact sql? For example strings will be "", numbers will be 0, and dates will be "1/1/1901".

I have over 500 columns, I don't want to go over each column and change the default value.

View 8 Replies

SQL Server :: SCOPE_IDENTITY() Always Returns 0?

Mar 3, 2011

I am trying to return the identity value of a inserted record for the first time in ASP.NET but it always returns 0, I can see in the database that a record is being inserted and the identity value is not 0.

Stored Proc:

[Code]....

Code Behind:

[Code]....

View 8 Replies

Windows Server 2003 IIS Renders 4.0 Pages As Blank?

Nov 25, 2010

I have a web project which works fine on my local development machine.

I copied the project to our UAT server, setup a virtual directory pointing to the project and configured it to run on .NET Framework 4.0. I even added the Default.aspx page to the Documents tab. I configured Directory Security to use Windows Authentication.

When i try to access any web page within this application, IIS responds with a blank page. I looked through the event logs and don't see any errors anywhere.

View 2 Replies

C# - Can Get WCF FaultException When Server Returns An HTTP 401

Jan 11, 2010

I have a WCF based test harness client for a set of web services. The test client allows me to see raw requests and responses going to and from the services. A Message Inspector endpoint behavior is used to "pick off" the raw requests and response messages and save them for later display in the UI.

This works great, except for the use case where invalid credentials are passed. The server returns an HTTP 401 along with a SOAP fault containing details of what happened. This hurts me in a couple ways:

On the client this shows up as a MessageSecurityException not a FaultException, so I can't get the details from the fault. This exception appears to prevent the AfterReceiveReply event handler on my message inspector from firing, so I have no access to the raw response.

Is there any way I can handle this case so that the SOAP fault comes through as a FaultException and allow my message inspector to handle responses regardless of the HTTP status code that is returned?

View 1 Replies

SQL Server :: Scope_Identity() Always Returns 0 And Not The Identity?

Oct 21, 2010

I have a Stored Proceedure which DID return the Scope_Identity when this was executed in SQLServer 2000.

Now I am porting this over to SQLServer 2008, and this always returns 0, and not the Scope_Identity which it should.

Here is the Stored Proceedure which will pass null for the parameter @pProjId for an insert:

[Code]....

Here is the script which creates the hip_Project Table:

[Code]....

What do I need to change for SQLServer 2008?

Again, this executed fine in SQLServer 2000 and always returned the Scope_Identity as expected. This problem has come up with other stored proceedures as well for which I need the Scope_Identity returned.

View 3 Replies

SQL Server :: SqlDataAdapter Update Returns 0 Records?

Jan 25, 2011

using ASP.NET 2.0 SqlDataAdapter update returns 0 records. I have a simple application that stores Passenger's ticket info in a sql database.

when a user clicks "Create Reservation" I add a Passenger Information (name, destination, PNR) to dataset
and save dataset in ViewState.

Then when user clicks update, I pull the dataset from viewState and try to update database. The update is returning 0. what i am doing incorrectly?

protected void btn_CreateReservation_Click(object sender, EventArgs e)
{
DataRow dr ;
dr = dt.NewRow();
dr["Name"] = txtBox_Name.Text; dr["Destination"] = txtBox_Destination.Text;
dr["PNR"] = Convert.ToInt32(txtbox_PNR.Text); dt.Rows.Add(dr);
dt.AcceptChanges();
ViewState["MyTable"] = dsPassengers;

[Code]....

View 1 Replies

Retrieving Message Body When Server Returns 500 Error

Oct 12, 2010

I have a routine that submits a SOAP request using HttpWebRequest and WebResponse. If the SOAP Request fails the server sends back HTTP/1.1 500 Internal Server Error. When I trap the error I have yet to find a way to view the body of the reply which contains the fault code. Is there a way to retrieve the message body when the server returns a 500 internal Server Error? In body of the reply which I am not able to retrieve.
faultstring xml:lang="en-US" Specified argument was out of the range of valid values.

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







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