Could not load file or assembly 'DotNetOpenAuth.Core' - dotnetopenauth

I'm trying to implement OAuth in my existing MVC4 website. I had everything working in a test site, and everything was working fine on this particular site. I'm presently getting this error , but my web.config looks like this: . I tried this fix, I've tried GACing the components, I've tried uninstalling and re-installing the NuGet packages, I've tried clearing out the ASP.NET temp files, I honestly don't know what else to try... except maybe put my fist through my monitor.
Does anyone have any ideas? Thanks.

BTW, I solved the problem. It was because the project was upgraded from MVC 3, and I had the MVC 4 assembly in the list. Once I rebuilt the web.config from a new MVC4 project , the bindings stopped getting their wires crossed and the app started working again.
If you run into the same problem and want more details, reply here and I'll post them.

Related

Web Config Issue with IIS 7.5 MVC 5 App

So I have an MVC 5 application which has been running fine and is published to two individual servers, with the same configuration, however one gives http status 500, the other works perfectly. Both servers are exactly the same windows release, and patched up to asp.net 4.5.1.
Browsing the site locally gives the source of the problem as the web.config file, with the relevant config source lines being -1: and 0: Both showing blank lines.
I've no idea what's going on with this one. I have copied the app in its entirety back from the working instance to the none working instance no avail.
I'm a bit stumped.
To note, i've also removed IIS and reinstalled as i thought that could be the cause of the issue.
So after much headscratching it turns out that some clown removed URL Rewrite module from this box. After reinstalling using the web platform installer all is well. I hope somebody finds this useful in future.
Nicolas Carlo, your response pushed me down an alternate route of diagnosing the problem and was helpful in this instance, thank you.

Razor views not generating html after deploying Umbraco 7.2 in IIS 7

I am new to Umbraco, so I started creating a site to play a bit with it. While I had my site running on IIS express (either from VS or WebMatrix) everything worked fine. After deploying the site to IIS 7, the razor views of the front end are display in plain text, meaning that I actually see Razor syntax in the browser. Umbraco back office is working perfect though, except when I hit preview, in that case I get the plain Razor syntax again. I then try to deploy a simple new MVC project to IIS and the Razor engine worked just fine, so I guess is not a problem in IIS but in Umbraco configuration. Is there any configuration tweak I need to take care in Umbraco configuration to solve this problem? Thanks in advance for the help.
I also tried to deploy it in the IIS of my local development machine (the same in which it runs OK in IIS-express) which has the right framework and everything and I got the same cshtml display in the browser.
After struggling a bit more with the problem I found the issue causing this behavior. After installing the starter kit a lot of files are generated in the folder and subfolders of the solution. In order to publish the solution to generate the contents of your website the VS project needs to have all these files included as project files. I found out that some views were excluded of the project and thus not being generated when publishing. I included the missing views and double check that all important files were part of the project and problem solved.

mvc 4 app on a web server without mvc 4 installed

So I just upgraded my website to a MVC 4 site from MVC 3. My Web host does not have MVC 4 installed but was advised that I can just upload the dlls and all will be alright. I was directed to this link which apparently can be applied when installed
http://weblogs.asp.net/scottgu/archive/2011/01/18/running-an-asp-net-mvc-3-app-on-a-web-server-that-doesn-t-have-asp-net-mvc-3-installed.aspx
I did what is instructed on the following link but then I'm getting an error on my ViewExtensions which apparently (after a 2 hour research) is related to my upgrade (eg. http://s77.codeinspot.com/q/2109234) . Anyway this is the error being thrown.
filterContext.Exception.Message :\hostingpath............... error
CS0121: The call is ambiguous between the following methods or
properties:
'Torneyo.Infrastructure.Helpers.ViewExtensions.AccountProfile(System.Web.Mvc.ViewMasterPage)'
and
'Torneyo.Infrastructure.Helpers.ViewExtensions.AccountProfile(System.Web.Mvc.ViewMasterPage)'
Which doesn't make sense as it's the same and it's just coming from my viewextension class. Following is the part which is being called on my masterpage.
//-----------for master pages
static public User AccountProfile(this System.Web.Mvc.ViewMasterPage view)
{
return (Profile)view.ViewBag.AccountProfile;
}
So these were all working perfectly before the upgrade on the webhost. It runs perfectly on my local before and after the upgrade. I'm not really sure what else I need to do.
Please make sure that you have the correct binding redirects in your web.config. Chances are that parts of the app are referencing MVC3 and other parts are referencing MVC4. A binding redirect from MVC3 to MVC4 will "unify" everything to MVC4.
Check out the "upgrade" guide here: http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806
Finally fixed it. So I tried wiping out the DLLs and reinstalled it but it still doesn't work. What I had to do was to remove everything (Files in the wwwroot folder). And then published it again. Everything worked fine after that.

ASP.NET4.0 MVC4 IIS7.5 Error 403.14 I'm Literally Pulling Out My Hair

I want to get away from developing in PHP but doing that is proving to be a massive headache.
I am trying to set up a website with MVC 4, ASP.NET 4.0, on Win7 Professional (64-bit). The website is just the basic site that is set up with Visual Web Developer 2010 Express selecting New Project > C# > Website > ASP.NET MVC 4 Application.
After setting up the application in IIS7.5 I am getting an HTTP Error 403.14 - Forbidden. I've done a ton of research and tried multiple different suggestions on how to solve the problem but NOTHING is working. Here are some things I tried:
Install/Register v4 of ASP.NET. This has been the most annoying
thing because everyone else's issue is fixed when they do this but
mine is not.
Changing the application pool settings:
Set to classic/integrated mode
Change the user/permissions used by the application pool
Made sure 32-bit applications were enabled
Added security permissions to folders related to the website (on multiple accounts)
I can get a regular html document to show up if I add it to the websites root directory. It seems that the MVC stack is not being called at all. The server wants to display the directory, which I can enable/disable, but the website is not being displayed.
Please can I have more potential fixes before I resort to my last desperate act? A baseball bat.
p.s. I'm more than willing to do a skype conversation or a share screen kind of thing if someone wants to dig in deep. I am beyond frustrated with this.
So it seems, in my indefinite well of stupidity, I was pointing the webserver to the incorrect folder. I needed to point the webserver to the folder with actual files of the application rather than the folder containing the .SLN file. Sorry to waste your time!
try running the aspnet_regiis
http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx
open the command line in %windir%\Microsoft.NET\Framework64\v4.0.30319 and run
aspnet_regiis -ir
other possible solutions:
quit skype, or any other similar applications

MVC - Routing not working within intranet

I don't know anyone can help but I'd appreciate any. I am developing an app in mvc (c#), now I had various routes working on my local development machine when the app was stand alone however now I've tried adding the project to the test intranet at work and none of the routes are working.
So where Localhost/Admin/Create worked fine locally where admin is the controller and Create is the action, when I try to get to testintranet.mywork.com/intranetsection/myproject/admin/create I'm getting a file not found error. I'm not sure what I need to change to get it to pick up the routing again rather than look for the literal path. The default.aspx page works fine and gets called but apart from that nothing. Is routing only viable when in a standalone project?
Cheers for any help.
It looks like you're either running on IIS 6 or IIS 7 classic mode. If you can, I'd recommend updgrading to IIS 7 integrated mode. If not, I have a walkthrough for getting up and running on IIS 6.
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
You don't say what version of IIS you have deployed to, but you may be running into the issues described here:
http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/
I believe that most people chose to resolve this using a wildcard mapping for the aspnet_isapi.dll.

Resources