Web Forms :: Using Intelligencia.UrlRewrite In Code?

Jun 4, 2010

I'm using Intelligencia.UrlRewrite in my code, I'm creating an e-commerce website. On the localhost all works well. This is how it works on the localhost "http://localhost/eish2o/Reverse-Osmosis-with-booster-pump-p116/" When the add to cart button is pressed it changes to "http://localhost/eish2o/Product.aspx?ProductID=116". On the server it changes to, "http://localhost/eish2o/Reverse-Osmosis-with-booster-pump-p116/ProductID=116" and then gives an error The page cannot be found. It is all the same code.

View 5 Replies


Similar Messages:

How To Urlrewrite To Sub Domain

Nov 19, 2010

I'm using this way to rewrite my urls.

[URL]

rewrite url="^.*-n([0-9]+)/?$" to="~/News/ShowNews.aspx?NewsId=$1" processing="stop"/>

I want it to looks like I'm using subdomain. I don't want to use subdomains beacuse problem with paths.

View 4 Replies

Configuration :: UrlRewrite Or Is Somebody Trying To Hack Into Site?

Nov 14, 2010

I have an app using iis7 and the urlrewrite module, it take friendly urls and converts them to queries like this: [URL]

and converts it to: [URL]
the question I have is that will looking through my server event logs I notice that some ips are calling the following:[URL]

do you think this is the urlrewrite module messing up or is somebody trying to hack my site.

View 2 Replies

Configuration :: 301 Redirect Non-WWW Domain In Web.Config Using UrlRewrite

Mar 2, 2011

I have one web application that manages 20-30 websites (one asp.net engine loading different templates based on httphost)Im redirecting non-www requests to its www equivalent in my web.config using UrlRewrite.

<rules>
<rule name="301 Example Lazy Domain" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^example.com$" />
</conditions>
[code]...

View 2 Replies

Configuration :: IIS7: 404 Resource Not Found (URLRewrite)?

Sep 27, 2010

There is a strange behaviour with my web app which resides on the deployment server. This problem does not appears on the production enviroment (using the VS build-in development web server)

I am using URLRewriter and forms authentication on my web app. URL rewriting is performed by an http module on AuthorizeRequest. Also, runAllManagedModulesForAllRequests is enabled.

When I am trying to access some specific pages (NOT ALL OF THEM) with a rewriten url, IIS 7 returns me an 404 error.

Here are some of the rewriting rules:

Can be accessed BOTH rewritten and original url:
<rewrite url="^/home.aspx" to="/ASPX_FILES/home.aspx" processing="stop" />
<rewrite url="^/product/(.*).aspx" to="/ASPX_FILES/item_details.aspx?id=$1" processing="stop" />

[Code]....

View 1 Replies

Accessing Session In MasterPage Load Event After A UrlRewrite

Jul 15, 2010

Situation:In Web.Config we have CustomErrors turned on with redirectMode="ResponseRewrite".In Page_Load of our MasterPage we access the Session property of the Page.

Problem:When an Error occurs on any page the user gets redirected (via Rewrite) to our Error.aspx Page. There in the Page_Load of the MasterPage we access the Session and get an HttpException telling us to enable SessionState. But we have the SessionState enabled, definitly.

Question:How can we access the session after a UrlRewrite in the Page_Load Event of our MasterPage?

View 2 Replies

How To Use Intelligencia.UrlRewriter

Nov 19, 2010

I'm trying to use theIntelligencia.UrlRewriter that Scott Gu wrote about and another guy located ehere: [URL] Some info about my app: I have a master page with a menu populated via dataset. Users add pages to the site and store them in the database. One table for the page and another for the content. When the user selects a page in the menu control I redirect them to the default.aspx page which is a child of the masterpage. This works great.

Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
Response.Redirect("default.aspx?PageName=" + HttpUtility.UrlEncode(Menu1.SelectedItem.Text))
End Sub

On the Default.aspx page I get the page content with this:

Protected sub Page_Load(ByVal sender
As
Object,
ByVal e
As System.EventArgs)
Handles
Me.LoadIf
Not IsPostBack
Then
Try
If
Me.Request.QueryString("PageName") <>
Nothing
Then
divContent.InnerHtml = PageContent.Get_PageContentData(PageName)
GetControls(PageName)
Dim PageName
As
String = HttpUtility.UrlDecode(Request.QueryString("PageName"))Dim
PageContent As
New PagesElse
divContent.InnerHtml = PageContent.Get_PageContentData(
GetControls(
Dim PageContent
As
New Pages"Home")"Home")End
If
Catch ex
As ExceptionEnd
Try
End
If
End
Sub

EVERYTHING works with this except I'm left with a URL like this: [URL] I would like it to look like this:[URL] But only after I get the page content populate the page! How would I use the Intelligencia.UrlRewriter in this situation?

View 1 Replies

Intelligencia.UrlRewriter - Using Port Other Than 80?

Jan 20, 2011

Does anyone know if it is possible to configure Intelligencia.UrlRewriter to work when accessing a site via a port other than 80?[URL]

View 1 Replies

Block Direct Access To .aspx Pages Using IIS7's URLRewrite Module?

Mar 30, 2011

I am using IIS7's URLRewrite feature to hide the .aspx extension in my ASP.NET WebForms application's URLs.

I'm using the following configuration:

[code]....

I can now browse to:

[URL]

and this is rewritten to:

[URL]

This preserves the "pretty" url in the browser address bar. I have also updated all my links on the site to use the extensionless URLs.

The problem is that the underlying .aspx pages can still be accessed directly and I'd like to prevent this.

If a user browses to [URL] I'd like it to either redirect/rewrite to [URL], or at the very least just return a "Page not found".

Update:

I managed to get this working by redirecting all .aspx pages to the home directory. This isn't ideal as I'd prefer to send them to the non-.aspx version, but it will do for now.

<rule name="Block .aspx" stopProcessing="true">
<match url=".aspx" />
<action type="Redirect" url="/" />
</rule>`

How do I rewrite and redirect URLs that directly address .aspx pages to my friendly URL format?

View 2 Replies

Intelligencia.UrlRewriter - Session State

Aug 30, 2010

I have implemented a URL rewriting(extensionless) using Intelligencia.UrlRewriter, it works perfectly on my PC but on the server I am getting the following error Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration. this is my web.config file

<?xml version="1.0"?>
<configuration>
<configSections>
<section name="rewriter" requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings>
</appSettings>
<system.web>
<!--

Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development.

-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
</compilation>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-GB"/>
<!--

The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user.

-->
<authentication mode="Forms">
<forms loginUrl="/Admin/Login.aspx" name="FormAuthentication"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<!--

The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="admin/Error.aspx" />
<error statusCode="404" redirect="admin/Error.aspx" />
</customErrors>-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--

The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS.

-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
</modules>
<handlers>
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v2.0.50727"><dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding></runtime>
<rewriter>
<rewrite url="~/([0-9]*)/.*" to="~/custompage.aspx?Id=$1" />
</rewriter>
</configuration>
this is the error's stack trace

[HttpException (0x80004005): Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration.]

System.Web.UI.Page.get_Session() +2647836
System.Web.UI.UserControl.get_Session() +17
MmmarvellousWebSite.userControls.WebSite.VerticalMenu.Page_Load(Object sender, EventArgs e) in C:Documents and SettingsGiga GigaprMy DocumentsVisual Studio 2010ProjectsMmmarvellousWebSiteMmmarvellousWebSiteuserControlsWebSiteVerticalMenu.ascx.cs:10
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

View 2 Replies

Not Showing Images After Using Intelligencia URL Rewriter?

Nov 10, 2010

I am using the ajax slideshow which retrives an Image URL from my database table/ It works fine but as soon as I started using the Intelligencia.UrlRewriter, images are not showing. all my code is below.

Code Behind
private static DataTable tblData = new DataTable();
string sName = Request.QueryString["Id"];
<query string param is UserId>
string strSQL = "SELECT [ImageUrl],[FirstName], [LastName] FROM [Images] WHERE ([FootballerId] = @FootballerId)";
SqlConnection conn = new SqlConnection("Data Source=xxxxxxxxxxxxxxxxxx");
conn.Open();
SqlCommand comm = new SqlCommand(strSQL, conn);
comm.Parameters.Add("@FootballerId", SqlDbType.NVarChar).Value = sName;
SqlDataAdapter da = new SqlDataAdapter(comm);
tblData = new DataTable();
da.Fill(tblData);
conn.Close();
// set the initial image
if (tblData.Rows.Count > 0)
{
imgShowImage.ImageUrl = tblData.Rows[0]["ImageUrl"].ToString();
imageLabel1.Text = tblData.Rows[0]["FirstName"].ToString();
}
}
}
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static AjaxControlToolkit.Slide[] GetSlides()
{
AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[tblData.Rows.Count];
for (int i = 0; i < tblData.Rows.Count; i++)
{
DataRow dr = tblData.Rows[i];
slides[i] = new AjaxControlToolkit.Slide(
dr["ImageUrl"].ToString(),
dr["FirstName"].ToString(),
dr["LastName"].ToString());
}
return slides;
}
ASPX
<cc1:SlideShowExtender
ID="slideshowextend1"
TargetControlID="imgShowImage"
SlideShowServiceMethod="GetSlides"
AutoPlay="true"
ImageDescriptionLabelID="imageLabel1"
NextButtonID="nextButton"
PlayButtonText="Play"
StopButtonText="Stop"
PreviousButtonID="prevButton"
PlayButtonID="playButton"
Loop="true"
runat="server"
Enabled="True">
</cc1:SlideShowExtender>
<div
class="GridRight">
<asp:Image
ID="imgShowImage"
runat="server"
Height="300px"
ImageAlign="Middle"
/>
</div>
SQL Database Path
/Footballer/sandra//Horses.jpg
Web Config
<rewriter>
<rewrite url="~/Sandra" to="~/CMC/PublicProfile.aspx?Id=dff12c6b-e37c-4591-97ae-a65c27c1de1d"/>
</rewriter>
rewriter>
 
<

View 2 Replies

Intelligencia URL ReWriter Mapping With Regex

Mar 25, 2010

I am using the Intelligencia URL rewriter in my asp.net web application. I use the web.config mappings I'm trying to map the following url:

[URL] To: [URL]

obviously in the above example, xxx is replaced from the "productId" from the "friendly" url. In my web.config, I've got so far:

<rewrite url="~/contract-deals/([w-_]+)/_(.+).aspx" to="~/ProductInfo.aspx?productId=$1"/>

This isn't working however. I need the correct regex to use for my requirements (regex really isn't my strong point!!)

View 1 Replies

Not Showing Image After URL Rewriting By Intelligencia

Dec 5, 2010

I am using Intelligencia for url rewirting. My problem is after url rewirting images and scripts lost becuase its urls changes.

<rewrite url="~/Pages/(.+).html" to="~/Default.aspx?PageId=$1"/>

if i remove pages from pattern it work correctly(like below)

<rewrite url="~/(.+).html" to="~/Default.aspx?PageId=$1"/>

View 2 Replies

Url Rewriting With Intelligencia Rule Not Working

Mar 17, 2011

Im using Intelligencia UrlRewriter for url rewriting. I have wrote a set of rules in the web.config file I have two sets pages, Static pages whose name is static but content is CMS based Dynamic pages (actually this is not simply a dynamic page its a category which have description and sub categories) Here both pages are being rewritten from the config file. For instance home page, about us page etc tis is being rewritten as

rewrite url="~/Home" to="~/Default.aspx"

The category page is being the same kind of url its being rewritten as

rewrite url="~/(.*)" to="~/GroupHome.aspx?Group=$1"

I have given the rules for the static pages first and then the category url but all the urls are being rewritten to grouphome, even if I have given the rule for home page, about us page etc before the category rule. I have tried even the ollowing still its directing to Group home,

<rewrite url="~/Home" to="~/Default.aspx"/>
<rewrite url="~/(.*)/" to="~/GroupHome.aspx?Group=$1"/>
<rewrite url="~/Home" to="~/Default.aspx"/>

How the rule can be rewritten to include both urls

View 1 Replies

AJAX :: Slideshow Images Won't Display / Intelligencia URL Rewriter?

Nov 11, 2010

on another post i mentioned the problem but simplified it here! I am using ajax slideshow extender and getting images from my database
Datbase table file path example

/ ImageURL
/Members/matt//jeanette4.jpg
Code Behind
//here i open sql connection to database and retrieve images based on GUID of UserId which i add as sql parameter.//
// set the initial image
if (tblData.Rows.Count > 0)
{
imgShowImage.ImageUrl =tblData.Rows[0]["ImageUrl"].ToString();
imageLabel1.Text = tblData.Rows[0]["FirstName"].ToString();
}
}
}
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static AjaxControlToolkit.Slide[] GetSlides()
{
AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[tblData.Rows.Count];
for (int i = 0; i < tblData.Rows.Count; i++)
{
DataRow dr = tblData.Rows[i];
slides[i] = new AjaxControlToolkit.Slide(
dr["ImageUrl"].ToString(),
dr["FirstName"].ToString(),
dr["LastName"].ToString());
}
return slides;
}
ASPX
Page shows the image
<asp:Image ID="imgShowImage" runat="server"
Height="300px" ImageAlign="Middle" />

This all works fine/ but when i set up the web config with Intelligencia.UrlRewriter code the slideshow images do not appear but the page gets divirted correctly

<rewriter>
<rewrite url="~/Matt" to="~/MembersClub/PublicProfile.aspx?Id=a8742959-aa5e-4830-9fc1-94f1b3d0bc41"/>
</rewriter>

The images are stored in a file directory named "Members".

View 1 Replies

Configuration :: Intelligencia.UrlRewriter Doesn't Works On Hosting Server

Apr 8, 2010

I have made a Website in Vs2008 on XP.Did the Url rewriting for this website by using Intelligencia.UrlRewriter.dll.It works fine locally.in my webconfing i did it like this ->

<rewriter>
<rewrite url="~/MstDealer/(.+).aspx" to="~/MstDealer.aspx?nTableKey=$1"/> <rewriter>

View 9 Replies

Configuration :: Intelligencia.UrlRewriter Not Working On Production Server IIS6

Apr 27, 2010

i am using Intelligencia.UrlRewriter on my website and it works fine on my development machine, i tryed to deploy on IIS6 and i get this error:

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.Please try the following: Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly. If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted. Click the Back button to try another link. HTTP Error 404 - File or directory not found.

Internet Information Services (IIS)
Technical Information (for support personnel)

Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404. Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages. this is the url that throws the error. [URL] this is the working url that is being rewriten to the above one. [URL]

View 2 Replies

Web Forms :: Call A Code Behind Function Form Html Source Code?

Mar 3, 2010

I want to call a function present in code behind from front page (html : source code)

i want to use like this:

Source code

<a href='<%# linkAlpha("B").ToString()) %>' title="B" id="B_List" runat = "server">B</a>

Code Behind

protected string linkAlpha(string value)
{
// /market-research/<%#Eval("customname")%>/
string str = "";
if (Request.Url.DnsSafeHost == "localhost")
{ // /market-reports/<%# Eval("customname")%>/
str = "Alpha_Category.aspx?q=" + value.ToString().Trim();
// Response.Redirect("Alpha_Category.aspx?q=" + value.ToString().Trim());
}
else
{
// str = "/market-reports/" + value.ToString().Trim() + "/";
str = "/Alpha_Category.aspx?q=" + value.ToString().Trim();
}
return str;
}

View 2 Replies

Forms Data Controls :: Radio Buttons / Property To Code In VB Behind Code?

Jul 1, 2010

I have a number of radio buttons on my page. When one is selected, I wish for certain controls to be made visible/invisible.

Can anyone tell me the property to code in VB behind code?

View 5 Replies

Web Forms :: How To Generate HTML Code By Commands From The Code Behind Page

Dec 30, 2010

how to generate HTML code from the code behind?

I would like to build a form that generate an html code inside a for loop.

I will let the user enter the photo name and No. of photos

Then I will generate an HTML code like this:

<a href="http://www.mzinj.org/images/gallery/Photo%20(1).jpg" target="_blank"> <img src="http://www.mzinj.org/images/gallery/Photo%20(1).jpg" alt="" width="345" height="247" /> </a> <br /> <a href="http://www.mzinj.org/images/gallery/Photo%20(2).jpg" target="_blank">
<img src="http://www.mzinj.org/images/gallery/Photo%20(2).jpg" alt="" width="345" height="247" /> </a> <br /> <a href="http://www.mzinj.org/images/gallery/Photo%20(3).jpg" target="_blank"> <img src="http://www.mzinj.org/images/gallery/Photo%20(3).jpg" alt=""
width="345" height="247" /> </a> <br />

depending on the No. of the photos the code will be duplicated in the loop

Then I will display the result of the loop in label or in a textarea to let the user copy it any where

The problem is that while compiling my code it considers the HTML code as a part of the behind file and gives errors on the single quote, the double quote and on the parentheses

View 4 Replies

Web Forms :: Support Legacy Code Without Access To Compiled Code Behind?

Mar 25, 2011

I have been asked to support a legacy app and I can't get access to the code behind files. I need to add a new feature that gets a list of items from the database on page_load, what way would adding an "in-page" page_load affect the compiled page_load?

View 2 Replies

Code Reusability / Put The Code In One Class And Want To Inherit Same Code In Each Page?

Apr 12, 2010

Following is the code to insert userName from session and PageName into table to keep record that how many times a user does hit a particular page.

To avoid repitition of code I want to put the code in one class and want to inherit same code in each page.

How to get this task? Please do share with me? Here is the OK code:

[Code]....

View 17 Replies

Web Forms :: Code Is Falling Into The Else Statement When Stepping Through Code

Mar 30, 2010

[Code]....

When the user hits the Enter Key I want to go through and validate some fields and kick it back to the user if a fields doesnt' validate. With the above code, the btnEnter_Click still is getting called even though I have it to return. I tried return false; too incase I misunderstood something.BTW, yes the code is falling into the Else Statement when stepping through code.

View 8 Replies

Web Forms :: Inserting C # Code Within The HTML-code. Aspx?

Jan 13, 2010

I can't write in english well, but I must try to have an answer for my problem.I have a problem that I have not found a solution, regarding the integration of C # code in the HTML code .aspxI want to do a loop on the

<ajaxToolkit:TabPanel of <ajaxToolkit:TabContainer to have several tabs by a few existing data in a DB table.

Here is a moceau of my code:

[Code]....

This code gave me this error:

Message d'erreur de l'analyseur: 'TabPanel_<%= idMagasin %>' n'est pas un identificateur valide.Translation: Message parser error: 'TabPanel_ <% = idMagasin%>' is not a valid identifier.I removed idmagasin like this:

[Code]....

System.ArgumentException: Une entrée avec la même clé existe déjà .

Translation:
System.ArgumentException: An entry with the same key already existsThe result is that I found a great problem to insert a C # code in the HTML code .aspx unlike others languages like PHP.

View 1 Replies

Web Forms :: Div Onclick Fire Function(on Code-behind Code) With ASP

Jul 2, 2010

div onclick fire function(on code-behind code) with ASP

[Code]....

View 3 Replies







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