Exception on UrlAgent KeepAlive.aspx Sitecore - asp.net-mvc

I am getting attached exception from one of the server but same code base working on other environment and code base does not have config related to this. Seems something available on sitecore instance creation itself.
that keepAlive.aspx is available in the respective farm and It is opening when I hit the same from browser

Related

Moving Identity Modules outside the ASP.NET MVC Project

I'm using ASP.NET MVC 5 and Identity 2.0
I moved the Identity 2.0 classes (classes defined in Model/IdentityModel.cs and Startup/IdentityConfig.cs) to a class Library because all my models need to reside outside the website, and so does the ApplicationUser class.
After moving the classes I had to install Microsoft.AspNet.Identity.EntityFramework and Microsoft.AspNet.Identity.Owin nuget.
Now when I run the application, I get the following error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace here
I don't really know what went wrong and where. Everything seems to work well till Startup.cs.
I managed to solve it by just deleting the database, and letting EF create a new one for me. The ApplicationDbInitializer's Seed() was called appropriately and everything worked fine.

Deploying ASP MVC 5 App with IIS 7.5

I try to deploy ASP MVC 5 app in virtual directory (without creating new iis application)
I use IIS 7.5
I already put
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true" />
in web.config file.
But when i go to app url with IE browser it shows me just directory listing like in screenshot below
Is there a way to deploy MVC 5 in virtual directory and make it work like usual MVC application?
You need to convert the virtual directory to application. Right click on it in the IIS management console and choose Convert To Application.... Also make sure that the associated application is configured to use Integrated Pipeline Mode.
I solved this problem earlier in my production environment by checking the directory pointer in IIS. Apparently when I unzipped the deployed site from one server to the next, the zip utility made an extra level, so IIS was pointing to /MyProject when the files were in /MyProject/MyProject. I had a little better clue though, you have Document Browsing enabled based on that screen shot, make sure not to do that in production. I set the site to log custom errors and got a 403.14 response, from there found a blog on my mistake. You need to setup the environment to find the specific module that's failing, I think something to do with trace routes, idk. I'm a software developer that always gets forced into doing devOps; was googling my own problem and thought I'd throw you a line. Without a specific error message, all I can tell you is IIS is not connecting to .NET; something is not configured correctly. Turn off directory browsing, google how to get good error logs back, and let us know the status code so we can help you: 403.14, 401, 500, 404? Also give us the module that's failing. If it's the last one on the handler list, guess what, IIS isn't connecting to the app, which I suspect is your case.

download source code, but not working

I had a problem with part 3 of an orchard tutorial...
so I was attempting to download the source code for part 4 and continue on from there (which can be found about 3/4 of the way down at the end of the tutorial on the page http://skywalkersoftwaredevelopment.net/blog/writing-an-orchard-webshop-module-from-scratch-part-4
However when I run part 4 from webmatrix I get the error(see below)
im guessing this is because iv only downloaded the code but i need to put it inside a seperate project? is this correct? can someone advise me how to do this?
thanks for any replies
The error states that there is no default document configured in IIS. Attempt to access the document using the full URL.
For instance http://localhost:28266/default.aspx (or similar)
You can then adjust IIS to have the correct default document (if desired)
Edit: After reviewing the referenced ZIP archive.
This looks like a changed file zip for the application. This isn't a complete ASP.NET MVC application by itself and, as such, isn't viewable stand alone. I don't have the time to parse the exact steps required to make this application work alongside the demos provided, but be sure you're either combining all of the previous files and folders in order or follow the instructions detailed by the author.
As referenced, this is not a complete ASP.NET MVC application and isn't ready to be immediately rendered by IIS.
The problem is probably that the application can't start for some reason, which causes IIS to attempt to respond to the request with other handlers. Because there is no default document defined (and there shouldn't), it tries to do a directory listing, which is not allowed in your configuration. Do not focus on what IIS is telling you but rather on why your application doesn't run.
Things to check:
you have built the application
you are running in full trust
you are running in integrated mode
there is no exception in app_data/logs
you added the module to a working Orchard instance, in its Modules directory

IntraWeb ISAPI Module throws "Unrecognized Command" Error on IIS 7

I am trying to configure an IIS7 web server to run my IntraWeb 10 application.
I followed the steps described by Dr. Bob and Chau Chee Yang.
The application starts but results in an error: Unrecognized Command: : WEB:.
(Web seems to be the name of the virtual directory used - I tried different ones and the message changes corresponding to that).
Looks like the virtual directories name is passed as a parameter to the ISAPI DLL...
The same DLL runs nicely on a web server with an older IIS (6 i guess).
Is there a configuration option that could cause/remove this?
My colleague solved it for me. He did this by removing everything I did and configuring the web sever from scratch again.
I suppose the problem was configuring the Handler Mappings on the wrong level of the tree.
But I'm not entirely sure about it. (The IntraWeb-DLL is assigned on the top level now)

ASP.NET MVC Unhandled Exceptions on Images?

I haven't been able to replicate the exception when I browse my site... but I found out about this through my event logger (it emails my cell phone when an unhandled exception occurs).
Here's the exception:
The controller for path
'/Content/UsrImg/ImageFileName.jpg'
could not be found or it does not
implement IController.
What I think happened is that the image that Google (or perhaps a proxy server) had cached no longer existed. When trying to go directly to that image, it load the "Page not found" friendly error I wrote.
But should it be throwing an unhandled exception on 404 errors? Seems a bit strange to me. Perhaps there something I can do in the routing to fix this?
I just ran into this issue yesterday. Check to see if the image is on your server. My problem was Build Action for the file was set to none, but it should be set to Content. It was not including the file when I published the website.
You don't need to change routing, as the Content directory should be invoke Routing.

Resources