MVC :: Aspx Pages Do Not Work After Upgrade?

Nov 12, 2010

I am posting this here after not getting any responses on StackOverflow.

Last night I upgraded my MVC2 project to MVC3 RC. I followed all the instructions in the release notes and upon running my project (With the Index action of the home controller coming up by default) the following exception occurred:

"Exception Details: System.InvalidOperationException: The view at '~/Views/Home/Index.aspx' must derive from ViewPage, ViewPage<TModel>, ViewUserControl, or ViewUserControl<TModel>."

All of my coding so far has been in areas, and I have not touched the Home/Index view in any significant way, and it worked last night prior to the upgrade. For reference, my view has the following code:

[Code]....

As you can see, I am inheriting from ViewPage even though it claims I am not. The HomeController.Index() view is exactly as what gets installed via a new MVC2 project. I did get pointed to the post here, and upon seeing that I tried a few things. First I tried to manually set my view engines in Global.asax like so:

[Code]....

This doesn't change anything, I still get the exception (even commenting out the RazorViewEngine call). Next I tried to go into the Home controller and did:

[Code]....

And this didn't work either. As of right now I"m at a standstill, as I can't run any of my pages currently. I use source control, so I can revert but I do want to take advantage of things in MVC3.

View 5 Replies


Similar Messages:

Security :: Aspx Pages Login Won't Work

Jun 24, 2010

I developed our feature rich web page which is constantly changing. I'm not much of a programmer but I know HTML and CSS pretty well. I have a need to create a couple of login page for prospects and end users to get to secured content. I put together a page that works perfectly in Microsoft Visual Web developer Express 2010. This includes a login page. Ironically, after learning how to do all this from a book, there is a web page that perfectly chronicles what I am trying to accomplish and the steps to do it. It's here: [URL]

I don't expect you to watch it, but there is a simple aspx page created for login and then users are created and the content is displayed after successful login. It works fine in m development environment, but when I post, nothing. Furthermore, twice in the last two days, after downloading my current site to my hard drive, and then posting back after adding this functionality, my FrontPage forms stopped working. I had to have my website restored from backup. The whole thing makes no sense and I can't find any precedence posted on any user forums. So any testing I do seems to wipe out my navigation structure.

I'm going to establish the site on a different server tonight and see if its configuration. If that works, I'm not sure where to g next. I'd appreciate any thoughts. The worst part is I can't post a test page or my Fropage contact forms stop working.

View 1 Replies

JQuery :: Menu Does Not Work For Pages Which Are In A Separate Folder Pages

Oct 24, 2010

I have added a jquey menu in my master page its working fine for those asp.net pages which are at the same level as master page.

But this menu isn't working at all for all of those page which aur in Editor's and Admin's folder. In these pages menu is displaying as simple html menu and unfortunately no jquery effect is shown on it.

I'm very confused why this menu isn't working for the pages which are in a seprate folder while the master page is added at the root level outside of all these folders.

View 16 Replies

Configuration :: How To Upgrade Web Server After Upgrade Web Site

Jun 6, 2010

I upgraded my site to works with Microsoft Visual Web Developer 2010 Express, works with .net 4.0 and new ajax tools. My site is manage on our site . Now it work on win server 2003 sp2 frameworks 2.0 ajax ast.net 2.0

Is the new upgrade site will work on the web sever ?Should I Upgrade the server to framework 4.0 ?

View 1 Replies

IIS 6/7 Threading - Long Running Aspx Page Keeps Other Aspx Pages From Loading

Oct 11, 2010

I wrote a test page that does a bunch of busy work in a method called at page load. This process as I have it now takes around 12 seconds.

If I try to load another page while the first long running page is loading, this second page doing nothing except writing out a world, it doesn't load until the first long running page is finished.

Why is this the case? I would think IIS would be able to handle multiple concurrent connections, it seems crazy that one long running page would stop every other page in the application from loading. I must be missing something or not understand how IIS works.

I would think multiple independent requests would be spawned on different threads. Is this only the case if the requests are from different sessions entirely? Are all requests from a single session bound to a single thread?

View 1 Replies

MVC :: Upgrade An 3 Project With Aspx Viewengine To Razor Viewengine

Jan 18, 2011

I have upgraded my MVC2 project to MVC3 project and now I want to change the viewengine from standard aspx to the Razor viewengine. I have tested to create a new MVC3 project with the Razor viewengine and this works just fine, but now I want to uppgrade my existing MVC3 aspx viewengine project to a project with the Razor viewengine.

View 17 Replies

Modify WCF Service To Work With .NET Pages?

Mar 30, 2010

I created a WCF service (.NET 3.5) that grabs data from a db and returns a list of objects. It works just fine. I tested it using the WCFTestClient application and got the desired results.Now, I tried to create an ASP.NET web application and consume the service. After enabling <serviceDebug includeExceptionDetailInFaults="true"/> in the config file, the error message is "Object reference not set to an instance of an object."How do I modify the service to work with ASP.NET?

Update 1 - I created a reference to the service. When I ran my very basic testing app, based on the sample code displayed on the service's default web page, I got the "Object reference not set to an instance of an object" message.The service is returning the correct results when I use the WCF Test Client utility provided with Visual Studio. When I try to use the following code, all in the page_load event, I get the object reference message.

PhoneNumberServiceClient client = new PhoneNumberServiceClient();
// Use the 'client' variable to call operations on the service
List<PhoneNumber> phones = client.GetPhoneNumbers();

// Always close the client.
client.Close();

View 3 Replies

All Pages But Default.aspx Not Using CSS?

May 5, 2010

Hey as you guys know I'm not so good at CSS. I wrote a site for a business a friend is starting using it, I've got it hosted on the web now, but all the pages but Default.aspx ignore the CSS file.

View 4 Replies

Use Asp Includes Within Aspx C# Pages?

Jul 29, 2010

I found that i can use Response.WriteFile to include them and most of the pages work, except that the login page is not working.

View 4 Replies

Max Number Of .aspx Pages Your App Should Have?

Nov 11, 2010

I know an ASP.NET app can have as many aspx pages as you want but after hitting a certain number of them (over 100) should I consider a different design? Or, as the months/years go by do I just keep adding more and more pages to my app?

View 3 Replies

How To Redirect Non Aspx Pages

Jun 17, 2010

I am using a shared hosting so I can't touch IIS, but is there anyway I could do in Global.asax or web.config that would redirect links like mysite.com/folder/ to a specific page?

View 1 Replies

C# - How To Minify Aspx Pages

Sep 30, 2010

I am developing a web-based Pokemon Online game. Since it is online, I would like to optimize it to run as quickly possible. I've installed Firebug and Page Speed minifying my HTML output. I'm also using VS2008, ASP.NET 3.5, AJAX, and IIS 7.5; along with URL-Rewriting. I want to minify my HTML, JavaScript, and CSS. Optimally, I'd like the minifying process to happen at compile time. I've spend hours looking online but couldn't find a decent solution,

View 3 Replies

ASPX Pages Not Reading CS?

Oct 28, 2010

I've recently launched my page but the aspx files are not reading the cs pages. For instance, my login page has c# redirecting users based on roles, but it just ignored the c# and goes to default.aspx. Everything works perfect in the development environment..

View 14 Replies

Hide .aspx From All Web Pages?

Feb 16, 2011

how i can hide .aspx from all my pages in my project

View 2 Replies

JQuery :: Unable To Work In Content Pages

Oct 3, 2010

some sample code to work with jquery in content pages. For example my jquery code for validating username availability works in web form but not in content page.

View 3 Replies

Configuration :: ASPX Pages Not Loading?

Oct 14, 2010

I had an ASP.NET 1.1 application that I converted to 2.0. I deployed the application under IIS 7 on Windows 2008 Server. I can browse images and static html pages but I can't browse .aspx pages. When I try to run any .aspx page, my browser says "Internet Explorer cannot display the webpage". My application pool is set to .NET framework 2.0 with Integraded in Managed Pipeline mode.

View 5 Replies

Web Forms :: How To Get The Pretty URL With An ASPX Pages

Mar 25, 2010

How do i get the pretty URL with an ASPX pages. I have listed a couple links below and their associated print page url. As you can see it resembles the Class instantiation method of declaring object but is used for a webpage with its extension.

I was wondering if this method can be used or if this is a URL rewrite to mask all the querystrings and sub directories being referenced. I remember doing stuff like this when i was working on a UNIX system using the .htaccess file to mask effective query
string being shown. I believe they called it a Clean URL, i maybe wrong as it has been well over 8 years since i dealt with the Unix .htaccess file and massaging urls with it.

For instance, look at the MSDN site pages:

http://msdn.microsoft.com/en-us/library/system.servicemodel.actionnotsupportedexception.aspx

Now when you want to print it:

http://msdn.microsoft.com/en-us/library/system.servicemodel.actionnotsupportedexception(printer).aspx

Now you select the same page but choose a different framework than its birth:

http://msdn.microsoft.com/en-us/library/system.servicemodel.actionnotsupportedexception(VS.100).aspx

and the print URL:http://msdn.microsoft.com/en-us/library/system.servicemodel.actionnotsupportedexception(VS.100,printer).aspx

As you can see they are not visually passing query strings but more like Class parameters. Is this just a simple URL rewrite after the page is loaded so the user doesnt see the query string information?

View 3 Replies

Web Forms :: Is It Possible To Create Aspx Pages On The Fly

Jun 28, 2010

Quick question... Is it possible to programmatically create and .aspx file on the fly, complete with Master page and user controls?

If it is, can anyone point me in the direction of how this can be done?

View 5 Replies

Jquery - Lightbox With An ASPX Pages

Feb 17, 2011

I'm wondering if you can use a lightbox with aspx pages? For my project, i'm trying to make some kind of search tool in that lightbox. On my default page , you have a img link that opens a lightbox (with an aspx page) In that lightbox, when you click a button (asp button), the page renders like a normal full browser page with the same content. The page should stay in that lightbox and rendering the results in a listbox. Is this possible? Or is this the wrong way?

View 2 Replies

C# - How To Make A Code Run On All Aspx Pages

Sep 3, 2010

I need to create a code that reads the QueryString and set a value on the Session and on the end of the page I need to clear the Session.

How can I make a code like this to run on all .aspx pages?

View 6 Replies

How To Display Username On All Aspx Pages

Nov 15, 2010

How to Dispaly the username on all aspx pages....?

am thinking that by using "session object" we can able to do this...bt am not sure

Can any send the code or links

View 3 Replies

What's Differences Between .aspx And .ashx Pages

Mar 29, 2011

what are the differences between .aspx and .ashx pages. I use ashx now when I need to handle a request that called from code and return with a response.

View 3 Replies

Systematically Debug The Aspx Pages?

Jan 6, 2011

Whats the best way to systematically debug the aspx pages ( not C# or Vb.NET managed code). Sometimes a small syntax or semantic error in aspx page displays " Internal server error or something similar" and I had to comment the last changes step by step to find out the error.

Is there any other systematic way of doing this ?

View 1 Replies

Conversion Of Html Pages To .aspx Using C#?

May 14, 2010

i m facing problem in converting .html pages to .aspx using c#secnario isi got one index.html pagei have to convert index.html into .aspx pages and that to in four pastop part as a.aspxmiddle part as b.aspxbottom part as c.aspxand then in d.aspx i have to combine all the three parts and call them in d.aspx...

View 7 Replies

Web Forms :: Use Regions In ASPX Pages?

Feb 5, 2010

is there any alternative to use regions in ASPX pages?

View 6 Replies







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