Click here to Skip to main content
12,447,242 members (60,473 online)
   

ASP.NET

 
AnswerRe: Need help to upload 500 MB file on FTP Pin
jkirkerx7-Nov-12 13:45
memberjkirkerx7-Nov-12 13:45 
AnswerRe: Need help to upload 500 MB file on FTP Pin
xut24477-Nov-12 14:37
memberxut24477-Nov-12 14:37 
QuestionHow to Get Local Area IP Address? Pin
Nandan Basak5-Nov-12 22:15
memberNandan Basak5-Nov-12 22:15 
AnswerRe: How to Get Local Area IP Address? Pin
Bernhard Hiller6-Nov-12 21:11
memberBernhard Hiller6-Nov-12 21:11 
GeneralRe: How to Get Local Area IP Address? Pin
Nandan Basak4-Dec-12 19:08
memberNandan Basak4-Dec-12 19:08 
AnswerRe: How to Get Local Area IP Address? Pin
rameshkashanna7-Nov-12 2:05
memberrameshkashanna7-Nov-12 2:05 
GeneralRe: How to Get Local Area IP Address? Pin
Nandan Basak4-Feb-13 2:05
memberNandan Basak4-Feb-13 2:05 
QuestionAn error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Pin
RKSPradeep4-Nov-12 20:11
memberRKSPradeep4-Nov-12 20:11 
JokeRe: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Pin
n.podbielski4-Nov-12 20:52
membern.podbielski4-Nov-12 20:52 
AnswerRe: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Pin
ryanb315-Nov-12 5:37
memberryanb315-Nov-12 5:37 
Questionvariable for aspx and all its ascx Pin
jrahma4-Nov-12 8:25
memberjrahma4-Nov-12 8:25 
AnswerRe: variable for aspx and all its ascx Pin
n.podbielski4-Nov-12 10:17
membern.podbielski4-Nov-12 10:17 
GeneralRe: variable for aspx and all its ascx Pin
Amir Jalilifard5-Nov-12 8:15
memberAmir Jalilifard5-Nov-12 8:15 
Questionhttpmodule, context.items.add("originalUrl") Pin
jkirkerx3-Nov-12 19:44
memberjkirkerx3-Nov-12 19:44 
I'm experimenting with the httpModule, using XP and IIS5.1, asp.net 4.0, in which I want to take a file called display.aspx?pNp=XXXX and turn it into a file name XXXX.aspx.

So I wrote the first part, I know what context.Items("originalUrl") is for, but I'm not sure if I actually need it, because I don't don't have the second part written or working yet. It's been awhile since my last 3 failures at attempting this.

I'd like to get another set of eyes on my code, before I procede, in case I really blew it here. And see if there are any mistakes.

It seems to work, and I get the error message below, so I figure it's ok.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.
 
Requested URL: /EN-US/part-lookup/catagory/XXXX.aspx

Imports Microsoft.VisualBasic
 
Public Class http_module_Details
    Implements IHttpModule
 
    Public Sub Init(context As System.Web.HttpApplication) Implements System.Web.IHttpModule.Init
 
        AddHandler context.BeginRequest, AddressOf context_BeginRequest
        AddHandler context.PreRequestHandlerExecute, AddressOf context_PreRequestHandlerExecute
        AddHandler context.EndRequest, AddressOf context_EndRequest
 
    End Sub
    Private Sub context_PreRequestHandlerExecute(ByVal sender As Object, ByVal e As EventArgs)
 
        Dim application As HttpApplication = DirectCast(sender, HttpApplication)
        Dim context As HttpContext = application.Context
 
        If Not context.Items("originalUrl") Is Nothing Then
            context.RewritePath(Convert.ToString(context.Items("originalUrl")))
        End If
 
    End Sub
    Private Sub context_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
 
        Dim application As HttpApplication = DirectCast(sender, HttpApplication)
        Dim context As HttpContext = application.Context
 
        If (context.Request.RawUrl.ToLower.Contains("details.aspx")) Then
            context.Items("originalUrl") = context.Request.RawUrl
        End If
 
        Dim originalPath As String = context.Request.Url.ToString()
        If Not context.Request.QueryString("pNp") Is Nothing Then
            Dim cP As String = context.Request.ServerVariables("SCRIPT_NAME")
            cP = cP.Replace("Details.aspx", "").Replace("details.aspx", "")
            Dim pn_P As String = HttpUtility.UrlDecode(context.Request.QueryString("pNp"))
            Dim scriptName As String = cP & pn_P & ".aspx"
            context.RewritePath(scriptName)
        End If
 
    End Sub
    Private Sub context_EndRequest(ByVal sender As Object, ByVal e As EventArgs)
 

    End Sub
    Public Sub Dispose() Implements System.Web.IHttpModule.Dispose
 
    End Sub
 
End Class

Questionhow to split a page using frameset Pin
fahad.11-Nov-12 2:02
memberfahad.11-Nov-12 2:02 
AnswerRe: how to split a page using frameset Pin
jkirkerx4-Nov-12 7:58
memberjkirkerx4-Nov-12 7:58 
QuestionHow do I call a remote Web Service from an Asp.net application? Pin
Nada Adel31-Oct-12 23:28
memberNada Adel31-Oct-12 23:28 
AnswerRe: How do I call a remote Web Service from an Asp.net application? Pin
Keith Barrow1-Nov-12 5:54
mentorKeith Barrow1-Nov-12 5:54 
AnswerRe: How do I call a remote Web Service from an Asp.net application? Pin
Mathlab2-Nov-12 6:22
memberMathlab2-Nov-12 6:22 
AnswerRe: How do I call a remote Web Service from an Asp.net application? Pin
jkirkerx2-Nov-12 18:41
memberjkirkerx2-Nov-12 18:41 
Generalasp.net Pin
rifayee31-Oct-12 22:50
memberrifayee31-Oct-12 22:50 
GeneralRe: asp.net Pin
Think On1-Nov-12 4:39
memberThink On1-Nov-12 4:39 
GeneralRe: asp.net Pin
rifayee1-Nov-12 19:13
memberrifayee1-Nov-12 19:13 
GeneralRe: asp.net Pin
mark merrens1-Nov-12 13:16
membermark merrens1-Nov-12 13:16 
GeneralRe: asp.net Pin
Think On1-Nov-12 20:29
memberThink On1-Nov-12 20:29 
Questionwhat is different between DataAdapter.Update( ) and DataSetAcceptChange( ) in ADO.Net Pin
RKSPradeep31-Oct-12 19:58
memberRKSPradeep31-Oct-12 19:58 
AnswerRe: what is different between DataAdapter.Update( ) and DataSetAcceptChange( ) in ADO.Net Pin
Sandeep Mewara3-Nov-12 7:43
mvpSandeep Mewara3-Nov-12 7:43 
QuestionHow to implement a component that facilitates Sftp in .net Pin
Member 787327431-Oct-12 19:56
memberMember 787327431-Oct-12 19:56 
AnswerRe: How to implement a component that facilitates Sftp in .net Pin
Sandeep Mewara3-Nov-12 7:46
mvpSandeep Mewara3-Nov-12 7:46 
Questioncopy sheets one work book to other work book using open xml in windows azure Pin
prakashreddy1730-Oct-12 23:06
memberprakashreddy1730-Oct-12 23:06 
Questiondesign a master page Pin
RKSPradeep30-Oct-12 20:50
memberRKSPradeep30-Oct-12 20:50 
AnswerRe: design a master page Pin
Rahul Rajat Singh31-Oct-12 2:25
memberRahul Rajat Singh31-Oct-12 2:25 
AnswerRe: design a master page Pin
jkirkerx31-Oct-12 7:23
memberjkirkerx31-Oct-12 7:23 
AnswerRe: design a master page Pin
ryanb315-Nov-12 5:42
memberryanb315-Nov-12 5:42 
AnswerRe: design a master page Pin
xut24477-Nov-12 14:49
memberxut24477-Nov-12 14:49 
Questioncopy folder on web server Pin
jrahma30-Oct-12 11:17
memberjrahma30-Oct-12 11:17 
AnswerRe: copy folder on web server Pin
jrahma1-Nov-12 11:09
memberjrahma1-Nov-12 11:09 
GeneralRe: copy folder on web server Pin
Vasudevan Deepak Kumar2-Nov-12 8:33
memberVasudevan Deepak Kumar2-Nov-12 8:33 
QuestionI need to get schooled here on using parameters and the reader for Oracle Pin
jkirkerx30-Oct-12 8:31
memberjkirkerx30-Oct-12 8:31 
AnswerRe: I need to get schooled here on using parameters and the reader for Oracle [SOLVED] Pin
jkirkerx30-Oct-12 12:07
memberjkirkerx30-Oct-12 12:07 
AnswerRe: I need to get schooled here on using parameters and the reader for Oracle Pin
Think On1-Nov-12 4:52
memberThink On1-Nov-12 4:52 
GeneralRe: I need to get schooled here on using parameters and the reader for Oracle Pin
jkirkerx1-Nov-12 12:29
memberjkirkerx1-Nov-12 12:29 
QuestionWeb Service: consume java web service in asp.net Pin
Member 394398830-Oct-12 2:25
memberMember 394398830-Oct-12 2:25 
QuestionDevelop Facebook application with 'asp.net', not with 'php' Pin
ThetaClear30-Oct-12 1:52
memberThetaClear30-Oct-12 1:52 
AnswerRe: Develop Facebook application with 'asp.net', not with 'php' Pin
Eddy Vluggen30-Oct-12 3:26
memberEddy Vluggen30-Oct-12 3:26 
QuestionASP REPEATER Pin
fahad.130-Oct-12 1:19
memberfahad.130-Oct-12 1:19 
AnswerRe: ASP REPEATER Pin
Eddy Vluggen30-Oct-12 3:28
memberEddy Vluggen30-Oct-12 3:28 
AnswerRe: ASP REPEATER Pin
Guptha Ch30-Oct-12 5:49
memberGuptha Ch30-Oct-12 5:49 
AnswerRe: ASP REPEATER Pin
jkirkerx31-Oct-12 13:13
memberjkirkerx31-Oct-12 13:13 
QuestionDropdownlist selected item text couldnt save into database Pin
Mathan Sivanantham30-Oct-12 0:52
memberMathan Sivanantham30-Oct-12 0:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 25 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid