MVC :: All Links Broken After Added One MapPageRoute?

Aug 13, 2010

I'm having a strange issue with MVC 2.0 that I can't find any information about.

Basically, I'm adding ASP.NET 4.0 WebForms URL routing for legacy pages on an application that also has MVC pages. Once I add *any* routes.MapPageRoute to Global.asax.cs, all of my MVC ActionLinks/etc immediately break and all point to the first "MapPageRoute" that was registered.

If I comment out the first MapPageRoute line, then all of my MVC links suddenly direct to the next MapPageRoute I have defined.

what's wrong? I checked my route names and none are duplicate, and none of the routes I am adding conflict in any way to my MVC routes. It seems as though I might have some sort of web.config configuration issue?

View 8 Replies


Similar Messages:

MVC :: Are All The MVC 2.0 CDN Links Broken?

Feb 9, 2011

Is it just me or are all the ASP.NET MVC 2.0 links listed on the ASP.NET CDN broken?

[URL]

ASP.NET MVC 2.0

[URL]

View 7 Replies

SQL Reporting :: Links To Https Are Broken?

Mar 15, 2010

RSS 2005: Even though we are serving our Reporting Services site via ssl, the links (Home/My Subscriptions/Help/Search) in the upper left corner of all pages still link to http://

I see this is a bug (with work-around) for the Help link but I see no answer for the other links.

As an alternative, is there any way to remove or hide the links (Home/My Subscriptions/Help/Search) in the upper left corner of all pages?

View 1 Replies

Security :: Broken Links On After Secure Login?

Feb 25, 2010

I have a masterpage that contains a number of links. When I login to the secure area of my website, the links are broken they are trying to access the page as if it was stored in the SecurePages folder. Code below:

[Code]....

View 8 Replies

SQL Server :: How To Improve Procedure To Prevent Broken Links Between 2 Tables

Jan 13, 2011

I have the following procedure and noticed during my first test that my first insert worked, but due to table design issue with the 2nd insert it failed. When i checked only 1 table had been updated.. i cant have that once its in production.

So can someone suggest on how i can improve the logic so that both inserts have to work or none at all.. We cant have broken links between the tables.

[Code]....

View 8 Replies

Can Freetextbox Display Links That Were Not Explicitly Added

May 5, 2010

I would like to display links that are pasted in as links rather than text but freetextbox does not seem to do this. For instance, if somebody pastes in [URL] it looks like a link but shows up only as text. Do I need to convert this myself or is there a setting in the editor to take care of this?

View 1 Replies

Web Forms :: How To Write A MapPageRoute

Jul 1, 2010

I hope to map the url

http://www.a.com/1 =>
ttp://www.a.com/RunProgram.aspx?ProgramID=1
http://www.a.com/2 =>
ttp://www.a.com/RunProgram.aspx?ProgramID=2
http://www.a.com/3 =>
ttp://www.a.com/RunProgram.aspx?ProgramID=3

How to write the MapPageRoute in asp.net 4.0?

routes.MapPageRoute("", "{ProgramID}", "~/RunProgram.aspx") seems there are some problem!

View 3 Replies

Webforms MapPageRoute Order Of Precedence?

Jun 4, 2010

I am attempting to use the MapPageRoute feature in Visual Studio 2010 and .NET Framework 4.0 with a asp.net webforms application.

What I have noticed is that if I define a page route called "Default" like below and the page Default.aspx exists in the project, then the route does not work.

routes.MapPageRoute("Default", "default.aspx", "~/Page2.aspx");
routes.MapPageRoute("Test", "test.aspx", "~/Page2.aspx");

If I change the name of the Default.aspx in the project to Default_1.aspx,
then the route works fine.

There seems to be some order of precedence going on. Is there a way to make my route definitions evaluated first so I don't have to rename my pages to use the routing engine?

View 1 Replies

Default Document In Web Form Does Not Work After Using MapPageRoute?

Jun 4, 2010

I have two strange problems when I use routing in a web form application. Environment: IIS 7.5; .NET 4.0 and Windows 7 64 bit.

default document does not work if I use (http://www.)mydomain.com. The exception message is "The controller for path '/' was not found or does not implement IController". However, if I debug in VS 2010 (http://localhost:8080), this problem has never come out. Here mydomain.com and http://localhost:8080 hit the same code in the same folder of the same computer. I trapped the value of request.path. When local host is used, the value is "default.aspx" while "/" if mydomain.com is accessed. I can use one line (if "/" then redirect to default.aspx) to "fix" the problem but I believe it should have a better way. when I detect request.path, I got such a VERY strange request which I have never seen before: 192.168.1.11/StableWSDiscoveryEndpoint/schemas-xmlsoap-org_ws_2005_04_discovery! I have no idea where it is from. I do not use any web service in my code. The request is posted to the server, and the user agent is WSDAPI. I tried to debug the code from a different browsers other than IE. It looks like I do not get such a request. Edit: I just found the 192.168.1.11/StableWSDiscoveryEndpoint/schemas-xmlsoap-org_ws_2005_04_discovery request is sent from the domain control.

View 1 Replies

ASP:Menu Broken In IE 8?

Dec 22, 2010

I'm using an ASP:Menu control declared in markup as:

[Code]....

This is a simple menustrip that just gives the viewer of my webpage the ability to set the natural size of the page to something more suitable to the size of their browser window or screen resolution.
The onclick code:

[Code]....

This is ridiculously simple stuff; the Session Resolution set by the click event is checked and accounted for in Page Init and PreRender and isn't relevant to this issue.In Visual Studio 2008 Debug mode on Windows 7, the page and its Menustrip load and work just fine in Firefox and also IE8 - everything works exactly as expected.After moving the project to my deployment platform (a Windows 2003 STD Server running IIS), the page continues to work just fine in Firefox but in IE8 (from the same Win7 machine I tested IE8 with in debug mode) the Menustrip won't work in IE8... the top-level shows, but when I move my mouse over the Page Size link it doesn't pop out the various size options - the left border edge disappears but the menu items don't appear. I've verified that Javascript is enabled in IE8.

View 1 Replies

AJAX :: RoundedCornersExtender Broken In IE8?

Jan 5, 2010

I have a panel that uses the RoundedConersExtender to round the corners on the border around the panel. It was working fine in IE7 but now in IE8 the top and bottom seem to be separated. I looked through previous questions and it seems that this was a problem with Firefox as well but no solution. Does anyone know a workaround other than using compatibility mode?

View 2 Replies

Web Forms :: After Added Already Existing Project The Solution Icon Vanished By Showing The Icon Of Recently Added Project?

Feb 1, 2010

I have the following list of projects WebUI (WebSite) , DataAccess (ClassLibrary) , LogicLayer(ClassLibrary). Those of the project are purposively crated separately.But my scenario is, need to create only one solution file, then add all of the above projects under this solution file. So that i can be easiy interacted and changes can be made by opening solution file only instead of opening each project individually.

Simply all of the layer projects are under one roof means one solution. I tried it by adding solution first, then i added already existed project into this. But once after added already existing project the solution icon vanished by showing the icon of recently added project. By this way I could not add another project into this section too.Hope this is the way the basic real-time projects are created; to achieve the centralized control over architecture based projects.

View 4 Replies

Web Forms :: Broken TreeView Line?

Jan 13, 2010

i am using treeview in my web application, when i collapse all the node root node becomes disconnect. i mean the root node line is broken. can any one tell me how to fix this issue.

this is my code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TreeTest.aspx.cs" Inherits="TreeTest" %>

View 1 Replies

MVC :: Unobtrusive Validation Broken With JQuery 1.5.1?

Feb 25, 2011

Just found out this problem. Upgraded by site to jQuery 1.5.1. I had some cascading dropdowns populating via some very simple code like this:

[Code]....

This code no longer runs with jQuery 1.5.1 AND unobtrusive validation active. Fails also with jquery 1.5.0. Works fine with jquery 1.4.4.

View 2 Replies

Fix Broken Element That Miss Ending Tag Or /> With C#?

Oct 1, 2010

Is there a simple way to fix elements in a html document that miss the ending tag, or /> ending? I'm using ASP.NET with c# (loads html with the help of Html Agility Pack).

An example:

<img src="www.example.com/image.jpg">

should transform into

<img src="www.example.com/image.jpg" />

or

<img src="www.example.com/image.jpg"></img>

View 1 Replies

Broken RenderPartial After Upgrade To MVC2?

Mar 29, 2010

I upgraded a MVC1 project to MVC2, now all my calls to RenderPartial are throwing

System.ArgumentNullException: Value cannot be null.

However this does works:

<% Html.RenderPartial("~/Views/Shared/LogOnUserControl.ascx"); %>

And this does not (works in MVC1):

<% Html.RenderPartial("LogOnUserControl"); %>

Did the behavior of RenderPartial change?

View 2 Replies

Javascript - Validators Broken In FireFox?

Oct 4, 2010

I'm struggling with ASP .NET Validators JavaScript issue. Following function (part of framework generated code) tries to access validatioGroup attribute value using control.Field syntax. It works fine in IE, however in FF that value is always undefined. Consequently, validation always passes and my validation scenario is broken... Is there a way to get round it?

function IsValidationGroupMatch(control, validationGroup) {
if ((typeof(validationGroup) == "undefined") || (validationGroup == null)) {
return true;
}
var controlGroup = "";
if (typeof(control.validationGroup) == "string") {
controlGroup = control.validationGroup;
}
return (controlGroup == validationGroup);
}

View 1 Replies

VS2010's Property Editor Seems To Be Broken?

Apr 5, 2010

I have two issues, both deal with the property editor window.I always view my files using the "Source" view.

I thought I remembered with VS 2008 that when my cursor was within the code for a control such as a button and you was viewing the property window for that control that it used to have an icon of a lighting bolt at the top so that you could view the events for that control. That button no longer appears unless I switch to "Split" or "Design" view mode, which has many bugs so I cant work in that mode either.

Also I have been working on a project for about 4 weeks now. When I first started the project I was working on some membership pages like my Register page which has an "email address" input field on it. I had dropped a RegularExpressionValidator on the page back then and double clicked the property in the property window for ValidationExpression. At that time it popped up a window to let me select from a list of standard expressions. At that time I picked the Email expression. Today I was working on my Contact Us page which also has an email field input on the page. I dropped the same validator on the page but now in the property window I cant get the pop-up window to appear for the Validation expression.

Have I done something to mess up VS 2010's property window?Does anyone know of a setting that I could have accidently turned off or on?

View 6 Replies

Web Forms :: Is Routes.MapPageRoute("", "{ProgramID}", "~/RunProgram.aspx") Correct

Jun 30, 2010

I hope to map the following URL, Is routes.MapPageRoute("", "{ProgramID}", "~/RunProgram.aspx") correct?

[URL]

...

[URL]

View 2 Replies

Web Forms :: Menu Control CSS Styling Broken In .NET 4?

Apr 16, 2010

I'm in the process of styling an asp.net menu in .NET 4 and I'm trying to understand the meaning of the StaticSelectedStyle-CssClass and StaticHoverStyle-CssClass parameters.My understanding is that the styles defined with these parameters are applied as CSS classes to the relevant elements, whenever needed. So I created my menu as follows:

[Code]....

It works for StaticMenuStyle-CssClass and StaticMenuStyle-CssClass (the classes are applied to the relevant elements), but StaticSelectedStyle-CssClass and StaticHoverStyle-CssClass are not applied, regardless of the selected or hover status of an element.
Here is the generated HTML:

[Code]....

So as you can see, StaticMenuStyle and StaticMenuItemStyle are applied, but not StaticSelectedStyle-CssClass or StaticHoverStyle-CssClass. Not sure why. I know I can use selected but isn't the expected behavior that StaticSelectedStyle-CssClass be applied??? By using selected I make assumptions as to what .NET does behind the scenes and that's not right.

View 2 Replies

Web Forms :: Broken Link Checker Method?

Jan 8, 2010

I have a .NET 3.5 web app that displays "resources". Each resource is a link to another site, document, download, etc. All resources are stored in a SQL backend.I'm looking for a method to be able to check all links in the DB, then mark the broken ones. Is there any .NET function that would service this? We could do it in our existing web app or build a console app or whatever. I'd also be interested in 3rd party software if it met my requirements.

View 4 Replies

Finding Alternatives To The Often Broken App_offline.htm Hack?

Mar 14, 2011

In quite some scenario's, placing app_offline.htm in the root is just right: you do some updates, the message appears while updating, and that's that. The idea is, as Microsoft puts it, that before anything is called, IIS first checks if app_offline.htm is there and if so, it cancels everything and displays it.

So for so good, but in many situations it doesn't work:

When you have a compile error in an ASPX page and a user links directly to it When you have conflicting assemblies When you have a parsing error in your web.config In the midst of removing / uploading the entire site.

A direct link to a static HTML page is still displayed as suchm File-not-founds, access-denieds are thrown before the message is shown Possibly more scenario's exist that fail. My point is: for any serious updating work, app_offline.htm is not suitable. I sometimes create a redirect in IIS, to another site, but another site may not always be available and it can confuse users.

Ideally, I'd want to keep the current location in the url location bar of the end-user, show the message, and have the page auto-refresh each minute to see whether the site is back, so that the user continues where he left of when the site comes back. While technically easy enough with a static page, it will fail for the above mentioned reasons the minute an error is thrown.

View 3 Replies

MVC :: Is Using (Html.BeginForm()) Broken With Cookieless Sessions And IIS 6

Jan 22, 2010

I have an MVC site that I've been developing and one of the requirements is cookieless sessions. When I use this code to start my forms. <% using (Html.BeginForm())&nbsp;&nbsp; &nbsp;{ %> I get the following output. <form action="/MyAccount/Home/Login" method="post"> if I use one of the overloads to specifiy the controller, action, route values, etc... <% using (Html.BeginForm("Login", "Home", new { ReturnUrl = Model.ReturnUrl },&nbsp; FormMethod.Post))&nbsp;&nbsp; &nbsp;{ %>

I get the following output... <form action="/MyAccount/(S(npnaj4fn12x3ie45xzuyzjqn))/Home/Login" method="post"> I found this issue after I deployed it to our IIS 6 server. It works fine in the Visual Studio development web server.

View 12 Replies

Configuration :: Images And Scrips Broken When MVC App Moved To IIS?

Jul 28, 2010

I am trying to deploy my MVC application to IIS 7.5. According to the ASP.Net MVC 2 in Action book (pg 82) all i have to do is copy the bin, content, global, scripts, views, and web.config folders and files. However, when I try to go to the app all the image, scripts, and stylesheet links are broken. If I try to "fix" the links for example "../../Content/myImage.jpg" to "/Content/ccac_logo.jpg" the images will work in IIS but not in the local development server (that comes with VS). In addition, I cant get the script files (like jquery-1.4.1.js) to work at all when served in IIS. What am I missing?

View 3 Replies

C# - .net 4 Xslt Transformation Extension Function Broken?

Aug 4, 2010

I'm in the process of upgrading an asp.net v3.5 web app. to v4 and I'm facing some problems with XSLT transformations I use on XmlDataSource objects.

Part of a XSLT file:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HttpUtility="ds:HttpUtility">
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
<xsl:template match="/Menus">

[Code]....


The problem seems to be in the line

<xsl:value-of select="HttpUtility:HtmlEncode(MenuTitle)"/>

Removing this and replacing it with a normal text, it will work. The way I setup the XML datasource:

xmlDataSource.TransformArgumentList.AddExtensionObject("ds:HttpUtility", new System.Web.HttpUtility());
xmlDataSource.Data = Cache.FetchPageMenu();

I've been searching the Microsoft pages for any changes in v4, but can't find any. All this worked fine in v3.5 (and before v2). Not receiving any errors, the data is just not displaying.

View 1 Replies







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