Thursday, May 28, 2009
Thursday, May 21, 2009
HTTP handlers and HTTP Modules
Built-In HTTPHandlers:
HttpHandler | Purpose |
PageHandlerFactory | Processes .aspx pages. |
WebServiceHandlerFactory | Processes .asmx XML Web services. |
HttpForbiddenHandler | Yields an error message indicating that a type of page is not in service. By |
StaticFileHandler | Delivers any page that isn't specifically mapped, such as .html, .htm, |
TraceHandler | Shows the page containing all of the trace output. |
Wednesday, May 20, 2009
To get membership database in SQL Server
Type the following in VSTS command prompt:
aspnet_regsql.exe -E -S -d -A all
aspnet_regsql.exe -E -S
Wednesday, May 13, 2009
Thursday, May 7, 2009
Sending special characters in Querystring
When you need to pass some special charaters(+, % etc.) in Querystring you will need to encode it first before redirecting.
Response.Redirect(www.abc.com/createtask.aspx?taskID= + Server.UrlEncode(Session["TaskGUID"].ToString())
This is very helpful when you are going to send some GUID values.
But keep in mind don't use Server.UrlDecode in createTask.aspx page as Request.Querystring automatically recieves decoded string.
Response.Redirect(www.abc.com/createtask.aspx?taskID= + Server.UrlEncode(Session["TaskGUID"].ToString())
This is very helpful when you are going to send some GUID values.
But keep in mind don't use Server.UrlDecode in createTask.aspx page as Request.Querystring automatically recieves decoded string.
Wednesday, May 6, 2009
Global.ASAX Error handler to know which file is missing
Write the following code in your Global Error handler to know which file is missing.
void Application_Error(object sender, EventArgs e)
{
String FileName = HttpContext.Current.Request.Url.ToString();
String RequestFrom = HttpContext.Current.Request.UrlReferrer.ToString();.....
}
Put a breakpoint at first line and check the value of FileName to know which file is missing.
void Application_Error(object sender, EventArgs e)
{
String FileName = HttpContext.Current.Request.Url.ToString();
String RequestFrom = HttpContext.Current.Request.UrlReferrer.ToString();.....
}
Put a breakpoint at first line and check the value of FileName to know which file is missing.
Subscribe to:
Comments (Atom)