WebApplication moss feature throws FileNotFound on one environment

339 Views Asked by At

I developed a certain feature at web application scope, I've deployed it in my development computer, activated it and it worked fine.
Once I've deployed it in out Test environment and tried to activate it, it throws "File Not Found".
The main difference between the servers which I think of is that the Central Admin in the Test env. is not a front-end, while in my dev computer everything is hosted on the same computer.

I think it has something to do with the feature trying to reach "propeties.Feature.Parent as SPWebApplication" (I can't debug the code in the test environment)

Any ideas ?

Thanks in advanced.

1

There are 1 best solutions below

2
On

Ok, this is the second time I’ve had this problem, so I’m going to blog about it so maybe I’ll remember next time. If you’re using VS 2010 and developing outside of IIS (console application in my case), you need to make sure your project is not targeting the x86 Platform. Go to your Project Properties, click the Build tab, and make sure the Platform target dropdown is set to x64 (or Any Platform). Another less than helpful error…

From FileNotFound Exception when creating SPSite or getting reference to SPWebApplication (SharePoint 2010)

Also see this post: FileNotFoundException with the SPSite constructor