Sharing Session through Webforms and MVC application - asp.net-mvc

I have a webforms project and an MVC project but the login is only one that is through the webforms project. In the home page, we gave the user to select the project either MVC or web forms, if the user selects the MVC project then we are redirecting to MVC project but the real problem came at the time of authorization.
I am unable to get the session variable from Web forms to MVC
I am using SQLServer mode and cookies enabled
Please help me in this
Thanks

Related

ASP.net MVC Login Page Theme/Customisation

I am using ASP.net mvc to create a login page. However, I would like to know if there are any ASP.net MVC login templates or themes I can implement. I am going for a minimal theme. So something clean. I would appreciate if you could direct me to any sites as I cannot find any help on google.
If you're new to css and html design in general... I would point you toward using bootstrap by twitter. Here is a sample login form
Visual Studio comes with templates, when creating an MVC application select the internet application template.
Here is the description:
A default ASP.NET MVC 4 project with an account controller that uses
forms authentication.
You can tweak it to meet your needs.

How to open MVC 4 view page from webform.aspx page?

basically i am looking for something like this ,
i got webform.aspx page and have button there, if i click on it i need to show MVC view page
idea is i want app with webform and mvc !
what i am trying is :
http://www.packtpub.com/article/mixing-asp.net-webforms-and-asp.net-mvc
but here i am confused about webconfig settings
please help me to get it done,
thanks
Scott Hanselman has a good guide on integrating MVC with a Web Form App, it should take you through the steps, here it is in a nutshell:
Run the Upgrade Wizard (open the Visual Studio2008 Web Application
in Visual Studio 2010)
Create a default ASP.NET MVC application for reference (you'll throw it away later)
Use a differencing tool like Beyond Compare to integrate the new web.config entries from the ASP.NET MVC sections into the upgraded ASP.NET WebForms application

Can i add MVC project in normal asp.net c# project?

can anybody tell me that if i made a normal asp.net c# project and in that solution i want to add mvc project. so is it possible to call mvc view from normal page which is in first project? if yes then how can i call view page from normal page of asp.net c# project.
on live server how can i call mvc page?
Thanks
Samir
Mixing VB ASP.NET and C# ASP.MVC projects in a single solution
Ok, couple of different things here.
Can a ASP.NET forms project exist in the same solution? Yes
Can you mix MVC with WebForms in the same project? No
Can a MVC site communicate with a WebForms site? Yes, you can easily pass between via simulated form submission or by URL. You could also configure cookies to work across both sites.
Can you have an MVC site and a WebForms site use the same url? No

ASP.NET MVC (Form login): Validation of viewstate MAC failed

Im trying to use ASP.NET login controls, in a ASP.NET MVC project and i get this error, when i click the submit button:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
I have searched google and tried alot of solution, which worked for others including:
- Install .NET 3.5 SP1
-
- Check if there is only 1 on the page
Unfortunaly notthing works. Do you guys have any other suggentions?
/Thanks
Create a new MVC Webapplication and take a look at how FormsAuthentication is done there. You can't use the Login Controls.

Does asp.net MVC need to be compiled before it’s deployed onto a web server?

I can’t get a basic MVC site to work on my web server unless I’ve compiled it first in Visual Web Developer. If it doesn’t have a dll in the Bin, it says the Namespace can’t be found.
In classic asp.net I could just upload the files and the server would compile it at first run. Is this not the case in MVC? Essentially I’d like to build an MVC site without using Visual Web Developer.
That's cause ASP.NET MVC is not based on the Website model that many ASP.NET Web Forms apps were. It is based on the Web application model.
You can read about Web Application Projects here.
I've read about people migrating the Web Application to the Web site model in ASP.NET MVC but I don't recommended it.
Yes, you do need to compile an MVC site and deploy some DLLs in a bin folder when you deploy an MVC site
You can build MVC without Visual web developer... but why?

Resources