Server Error in '/' Application. In AppHarbour - web-config

I have deployed a MVC project in AppHarbour but it is giving some errors in some pages when i move from one controller to other Link with error and Link without error
And Error is..
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

Related

Not able to get MongoDB.driver nuget for Webapi project

I am new to MongoDB and is trying to get this new Database connected with my Web api application ..But i am not able to add MongoDB.driver nuget for my Webapi project.Please refer screen shot.
My search is struck on this window for like forever.,have even restarted my project for a couple of times now.
I also tried installing this package through
PM>Install-Package MongoDB.Driver
But then this is shown
Am I doing something wrong ..?
i tried opening this url"api.nuget.org/v3/index.json"...but it says this site cant be reached..what does that mean?
Since the you could not open the url in browser directly, there should be some internet limitations in your internet environment. If you are work in the company, I suggest you contact your office IT to confirm whether they add any limitations and whether used any proxy. If they are using some proxy, you need to set the proxy settings in NuGet.Config file which store in C:\Users\user name\AppData\Roaming\NuGet as below settings. Detailed information please refer to the Proxy settings part in Nuget Config Section & Nuget Proxy Settings.
<add key="http_proxy" value="host" />
<add key="http_proxy.user" value="username" />
<add key="http_proxy.password" value="encrypted_password" />
Besides, you can chech the proxy in your machine: Open "System Properties" > Advanced > Environment Variables. Find the http_proxy var (in System variables), select and delete it.

Azure Cloud Deploy Keeps Recycling

I get the following error:
Recycling (Waiting for role to start... Sites are being deployed.
[2012-12-17T05:30:10Z])
Running One or more role instance is unhealthy. 1 Instance: 1
Unhealthy
i was actually trying to convert my web application to a cloud applicaton.
here is what i did:
i added a cloud project to my solutions,
i added a webrole which linked to my web app
i created an sql azure database and copied my whole structure and also the data to the db
i inserted the connection string in my webconfig and tried to run it on emulation, this worked fine
then tried to deploy it by creating a cloud service, running the builder to create the packages and uploading the packages in "staging" mode. this is where i got the errors.
i tried to create an empty cloud app and add a default webrole and load this to the cloud, this worked fine. so i figured, maybe i have something wrong in my settings of my webrole.
I checked the difference between both and i noticed that in both solutions diagnostics was enabled but the storage account was empty in my own solution, so i inserted "UseDevelopmentStorage=true" here. this didn't change anything tho. I also saw a difference in the "packages.config"
default role had:
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.7.0.0" targetFramework="net40" />
<package id="System.Web.Providers" version="1.1" targetFramework="net40" />
<package id="System.Web.Providers.Core" version="1.0" targetFramework="net40" />
<package id="WindowsAzure.Storage" version="1.7.0.0" targetFramework="net40" />
mine had:
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.7.0.0" targetFramework="net35" />
<package id="WindowsAzure.Storage" version="1.7.0.0" targetFramework="net35" />
i tried changing in this and uploading, didn't do anything
I am not using a worker role, i have only 1 running instance (same as default)
my application uses some authentication in global.asax where it tries to read from User.Identity.Name and compare with a user in the database (this user is inserted in the sql azure db). At first I thought this would maybe be the cause of the problem, but even if i comment out this code the application will not run on the cloud.
VM size is small, trust level = Full trust
I also saw some differences in the settings where i had remote access parameters. I tried removing all these just to exclude issues
i read something about settings references to "copy local is true", but im not sure if this will do any difference.
Any ideas because I don't really know what to do anymore
EDIT:
I modified all the references to "copy local is true" and i disabled to diagnostics just to be sure there's nothing wrong with it.
but now i get the error:
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Funny thing is, in my webconfig this is already set... And I can only find 1 webconfig.
I'm not quite sure what I'm doing wrong
"Keep recycling" almost always means that there are some exception occurred when your application was started. You might not be able to see any errors or exceptions in through the Diagnostics Montor since your exception might be occurred before you configured and started the diagnostics.
I recommend you enable the IntelliTrace option when deployment. It's very easy to do if you are using Visual Studio. Then you can retrieve the IntelliTrace result through Visual Studio and figure out what exception occurred. I strongly considered there are some references missed on azure that you need to set Copy Local = true. But you need IntelliTrace to find them.
The problem was that I had some referenced projects that had an app.config file with a string to a local database

Unable to run spring template project on STS

I created a template project named sample and started it with spring tc server. The application gets deployed but then when I go to http://localhost:8080/sample/ I get the following error
INFO: Server startup in 12669 ms
WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/sample/] in DispatcherServlet with name 'appServlet'
I followed the same steps as shown in http://www.youtube.com/watch?v=Y0V4oEnCcyA to create a spring web App.
I asked my friend to follow the same steps and test it on his Ubuntu 10.04 machine and it worked fine out of the box. I came up with the conclusion that it must be something with my machine. I'm facing this problem on Mac osx 10.4 and
SpringSource Tool Suite
Version: 2.6.0.RELEASE
My host file contains the following entry
127.0.0.1 localhost
Can anyone guide me as to how to rectify this problem?
Thanks.
That warning means that you didn't set something up right in your project, plain and simple. Without code we can only guess.
Speaking of guessing, check your web.xml and make sure it actually says "sample".
Template project does not work for me either.
I changed the servlet mapping onto
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
Follow up the request mapping in the controller
#RequestMapping(value = "/home.do", method = RequestMethod.GET)
Now you can open http://localhost:8080/sample/home.do
Check the log in your eclipse server console window (bottom screen). If you're like me, there's a bug when resolving the path for the home.jsp file. It comes from the servlet-context.xml file :
<beans:property name="suffix" value="/" />
should be
<beans:property name="suffix" value=".jsp" />
Make sure you clean and restart the server after doing that change, because it seems like this servlet-context.xml file is heavily cached.

deploying multiple struts apps in jboss problem

I m trying to deploy two struts2 projects(ear files) in jboss 4.2.2GA.When i deploy them seperately they work fine, but if i deploy them together i get the following error
Unable to load configuration. - action -file:/C:/jboss.........struts.xml:60:109
however one of the project works fine.For the other one, welcome page is loaded but none of the actions are performed.It shows this error
HTTP Status 404 - There is no Action mapped for namespace / and action name loginAction
I tried changing package name defined in struts.xml, but no luck
what could be th reason?Do i need to change any configuration in jboss or struts.xml
Ok,finally i made it to work. This post helped me.I added jboss-app.xml file in both of my applications with following content
<jboss-app>
<loader-repository>
com.adc.advertiser:loader=application1.ear
</loader-repository>
</jboss-app>
same for application2.ear
Also in jboss-servie.xml present in deploy directory i changed Java2ClassLoadingCompliance and UseJBossWebLoader to false

Crystal Reports images not visible in web viewer

I have some Crystal Reports (V10) in an application (.NET 1.1) I inherited that is deployed in four "identical" environments. In three of the environments, they are working fine. In the fourth, the chart graphics are not visible in the web viewer. They are visible if you export the reports.
The IT guys swear everything is exactly the same in all four environments and have kicked the problem back to me to solve. I'm not sure how I'm going to do that since I can't get to the servers to check anything for myself. But I don't see how this can NOT be an environment issue.
It seems to me that Crystal has the necessary permissions to write the file and to retrieve it to render the export versions of the report, but the ASP WP can't access the graphic file when the page is rendered.
Thanks for any suggestions you might have to help me!
RESOLUTION
From the IT guys: "We had to change the “Execute Permissions” on the CrystalReportsViewer10 folder within IIS from “Scripts only” to “Scripts and executables”. All of the other sites have only “Scripts Only” and they’re fine."
I could resolve this issue in dev enviroment adding next keys (handlers) to web.config:
<system.webServer>
<handlers>
<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
</handlers>
</system.webServer>
<system.web>
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>
</system.web>
There needs to be an IIS virtual directory called something like "CrystalReportViewers115". I think that the exact name changes between versions. This needs to be visible to your ASP.NET user. Start looking at the environments that work and see if they have this virtual directory installed, and compare it to the one on the failing environment. As another check, you should be able to enter in the URL for the images into a browser and see them. To find out the URL, right click on the picture and select "Properties". For example:
http://localhost/crystalreportviewers/images/toolbar/export.gif
You should see the picture when you browse directly to the URL.
Go to Start->Programs->Microsoft Visualstudio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt
and type
aspnet_regiis -c
This will automatically copied the corresponding files...
Add the aspnet_client folder in the source folder of the site. Example:
C:\inetpub\wwwroot\myapplication\aspnet_client\system_web\4_0_30319\CrystalReportWebFormViewer4
I recently experienced this very issue: although my resolution was a little different:
I tried setting the handler in the web.config but that didn't fix it.
I tried setting scripts & executables in IIS but that didn't fix it.
Once I went into the C:\Program Files\Common Files\Crystal Decisions\2.5\crystalreportviewers10 folder and turned off custom errors I could see the error was coming from an access denied issue on C:\Windows\Temp\
The solution was then to not and handlers or alter IIS to run scripts and executables, it was to allow the Network Service to read permission on C:\Windows\Temp\
EDIT:
Think I've found another solution which doesn't require permission changes... just set a virtual directory for aspnet_client; the level at which you select this will very much depend on your IIS layout.