Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Generating PURL's: Pulling User Credentials without querystring

$
0
0
Re: Generating PURL's: Pulling User Credentials without querystring
Web Connection 5.0
Re: Generating PURL's: Pulling User Credentials without querystring
08/03/2012
07:34:15 AM
3KC0G878C Show this entire thread in new window
Gratar Image based on email address
From:
Serge Grichmanoff
To:
Attachments:
None
Rick,

I have been reading the article and I have a couple of questions before I really get into this - and it is about the web.config file.

Here is what I now have in my web.config (below);

<!-- IIS 7 Script Map Configuration --> <system.webServer> <rewrite> <rules> <rule name="ExtensionLessUrls" patternSyntax="Wildcard" stopProcessing="true"> <match url="*.*" negate="true" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> </conditions> <action type="Rewrite" url="PURLHandler.m1" appendQueryString="true" /> </rule> </rules> </rewrite> <validation validateIntegratedModeConfiguration="false" /> <handlers> <add name=".M1_wconnect-module" path="*.m1" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" /> <add name=".wwsoap_wconnect-module" path="*.wwsoap" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" /> <add name=".wc_wconnect-module" path="*.wc" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" /> <add name=".wcs_wconnect-module" path="*.wcs" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" /> <add name=".wcsx_wconnect-module" path="*.wcsx" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" preCondition="integratedMode" /> </handlers> <httpErors defaultResponseMode="Redirect"> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" prefixLanguageFilePath="" path="/PURLHandler.m1" responseMode="ExecuteURL" /> <error statusCode="404" subStatusCode="0" path="/PURLHandler.m1" responseMode="ExecuteURL" /> <error statusCode="404" subStatusCode="1" path="/PURLHandler.m1" responseMode="ExecuteURL" /> <error statusCode="404" subStatusCode="2" path="/PURLHandler.m1" responseMode="ExecuteURL" /> </httpErrors> <defaultDocument> <files> <add value="getpin.m1" /> </files> </defaultDocument> <httpRedirect enabled="false" destination="" /> </system.webServer>

As you can see I tried to redirect the HTTP errors via the default Response Mode.

But here's the weird thing; I noticed a typo in how IIS wrote the '<httpErors defaultResponseMode="Redirect">' as it should read '<httpErrors defaultResponseMode="Redirect">'.
I installed the code you suggested from the blog (as shown above) and the trapping for the extentionless PURL works!
Not sure if it is the typo or if it's the added module! (just kidding!)

Naturally now I must handle the management of the received string, but, it appears the trapping of the 404 error works.

Now I added your code from your blog note

LOCAL lcOrigUrl, lnItems, loRewrite, lcQuery, lnX LOCAL ARRAY laTokens[1] *** Rewrite URL injects the original URL as a Server Variable lcOrigUrl = Request.ServerVariables("HTTP_X_ORIGINAL_URL") IF EMPTY(lcOrigUrl) lcOrigUrl = Request.GetExtraHeader("HTTP_X_ORIGINAL_URL") IF EMPTY(lcOrigUrl) *** or pull it off the querystring lcOrigUrl = Request.QueryString("url") ENDIF ENDIF

The wonderful this is, the lcOrigUrl presents exactly as I had hoped. That is, it traps and returns the string perfectly!

Thanks again Rick!
Serge


Take a look at this new blog post:

Extensionless Urls with Web Connection and the IIS UrlRewrite Module

which should let you do what you need to.

+++ Rick ---



Often we use a login form or a login panel to authenticate users and initiate a session for the user. Othertimes we may use something like id=& and pull the details out of the querystring.

However, how do we handle PURL's [personalized URL's]. For example say we have a website like www.MyWebsite.COM.

We do some marketing for the user and send them a direct mail piece to Jack Schitt that say's;
"Jack to your personalized page at www.MyWebsite.com/JackSchitt"

Upon loading the page whatever process will lookup the key JackSchitt and understand that the first name is Jack, last name is Schitt and so on.


I guess what I would like to know if Web Connect, is there a way to do this? Packages like Mind Fire, EasyPURL and so on have this technology and I know their systems have limited data capabilities.

thx.

Serge





Viewing all articles
Browse latest Browse all 10393

Trending Articles