views:

20

answers:

1

Hi All,

I have a web application which has 2 different versions deployed. 1 is an ASP.Net web forms version and the other is an ASP.Net MVC version

I have a File Upload page which dynamically creates a directory folder for the target location of the file to be uploaded to.

The application is using Forms Authentication for outside users and Integrated Windows Authentication for inside the network users.

I have an issue where a user can upload a file in the ASP.Net Web Forms version fine. But when the same user tries to upload the file in the MVC version the user gets a File.IO permission error.

Here's the kicker: I can upload the same file in both versions. The user is in a remote location but I believe they're still inside the network because they can work on the other parts of the application just fine.

Possible clues: In the event log there's an info that says Event code:4005 Forms authentication failed for the request. Reason: Ticket supplied was invalid.

What would be your initial thoughts on why this is happening?

Thanks,

Rod.

A: 

Make sure that both applications are configured to use the same machineKeys so that a forms authentication cookie created by the first could be decrypted by the second application.

Darin Dimitrov
@Darin - Since they are 2 different types of application, granted they both live on the same server and under the same web site in iis, are they somehow still connected? I thought they would be 2 different stand-alone applications. Granted, again, that the BLL and DAL DLLs from the WebForms application are being reused in the MVC application.
rod
@Darin - Also, I don't see the machineKey element specified in any of the config files (be it machine.config or the individual web.config) Is there something I'm missing?
rod
It should be in `machine.config`.
Darin Dimitrov
There's a machine key in fx1.1 machine.config folder in c:\windows..., but we're using fx2.0 and it's not mentioned in 2.0 machine.config
rod