I developed a asp.net project. it is connecting visual studio 2010 in the temprary server of visual studio 2010 but when I put it to the iis it does not conect. Please how can pix this matter ?
my web.config is like that;
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
</system.web>
<connectionStrings>
<add name="ConnectionString"
connectionString="Server=SRV-WORKFLOW; Database=PTC;User ID = MIKES\EMREAL;Password=EMAL5616.;Trusted_Connection=True;"
providerName="System.Data.SqlClient" />
<add name ="PTCconnection"
connectionString="Server=SRV-PLM; Database=wcadmin;User ID = MIKES\EMREAL;Password=EMAL5616.;Trusted_Connection=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
You are using Trusted_Connection=True which means it tries to connect to your database with the credentials from the user the apps runs under. In the case of IIS, it's normally an AppPool user. Either allow this user access to the database, change the app pool user or use SQL Server authentication.
You can get an overview of connectionstrings here : http://connectionstrings.com/
Related
Error showing on bigrock hosting for asp.net application
login failed for user ' '
On login link there is login page after entering right credential it gives me the error
"login failed for user 'shreesa.mdf'"
Bigrock tech support teams fails to resolve this issue. please help to solve this problem.
According to me there is some problems in my web.config file.
I am also adding the code here..
<configuration>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
</system.web>
<connectionStrings>
<add name="Conn" connectionString="Data Source=localhost;Initial Catalog=shreesa.mdf;Integrated Security=False; User Id=saachlrw; Password=******;" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
Modify your Connectionstring in this way:
Before
connectionString="Data Source=localhost;Initial Catalog=shreesa.mdf;Integrated Security=False; User Id=saachlrw; Password=******;"
After
connectionString="Server=localhost;AttachDbFilename=|DataDirectory|shreesa.mdf;Database=yourdbname;Integrated Security=False; User Id=saachlrw; Password=******;"
SQL Server connection strings
Good Morning,
We have an existing application that is stable and error free on a Windows Server 2008R2 with IIS 7.5 / .NET 4.5.
We are planning a move to Windows Server 2012R2 with IIS 8.5 / .NET 4.5 and are now encountered the problem that the application (identical binaries / configuration) are indeed injected two ScriptResource.axd files, but both contain the same content (different URLs).
Because of this, the MicrosoftAjaxWebforms.js, which provides "Sys.WebForms" is missing and i'm getting the Error
Unable to get property 'PageRequestManager' of undefined or null reference
The problem is browser Independent on two independent virtual machines.
The application runs in classic mode, the web.config does not contain the < xhtmlConformance > tag.
There are all the latest server updates.
All other functionalities of the application are working properly.
I hope some of you encountered the same Problem and know the solution.
Greetings, Verni
EDITH:
Snippet of web.config (system.web section)
<system.web>
<httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="" targetFramework="4.5" enableVersionHeader="false" />
<sessionState timeout="30" mode="StateServer" stateConnectionString="tcpip=...:42424" />
<httpModules>
<add name="LinkPartnerModule" type="....LinkPartnerModule, ..." />
<add name="RedirectModule" type="....RedirectModule, ..." />
<add name="ScriptCompressorModule" type="ScriptCompressorModule, ..." />
</httpModules>
<httpHandlers>
<remove verb="*" path="scriptresource.axd"/> // added from StackOverflow
<add verb="*" path="*js.axd" type="ScriptCompressorHandler" />
</httpHandlers>
<compilation debug="false" defaultLanguage="c#" targetFramework="4.5">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<globalization culture="de-DE" enableClientBasedCulture="true" fileEncoding="utf-8" uiCulture="de" />
<pages compilationMode="Auto" styleSheetTheme="*" validateRequest="false" enableEventValidation="false" controlRenderingCompatibilityVersion="3.5" enableViewState="true" clientIDMode="AutoID">
</system.web>
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="true" enableCaching="true" />
</scripting>
</system.web.extensions>
We had this issue as well for an application running in classic mode. The issue that time turned out to be multiple httphandlers registered for the .axd extension.
If you in your web.config make sure to remove any .axd handler before adding them it might resolve your issue.
Something like:
<remove verb="*" path="scriptresource.axd"/>
Edit:
When looking at your web.config I'm pretty sure the problem is related to the scriptcompressorhandler and module. As you stated this only happens using HTTPS and I suspect that what happens is that the module still runs over HTTPS but the handler does not. This means that the module sends the compressed version over to the regular scriptresource handler and a new copy of the script is outputted.
The solution would be to either activate scriptcompressorhandler over HTTPS as well or make sure the module is not run over HTTPS.
I fixed the Problem.
The reason was an misconfigured ARR (Application Request Router),
where SSL-Offloading was active.
The main reason of misconfiguration was the "function" that activates SSL-Offloading if no URL-Rewrite Rule is there with name like 'ARR_farmName_loadbalance_SSL'.
If this Rule will be deleted, the manager activates SSL-Offloading automatically.
Thanks to Robban, who brought me to HTTPS / SSL.
Here is my problem, have a Web Application that is being hosted using a Web Farm and Load balancer. The application is running on Framework 4.0, Windows 2003 server and IIS6. Our local host environment is Windows 7 and IIS7.
We noticed intermittent exceptions "The image is not found"and noticed the Web.config was pointing at 3.5
So we made a change to the web.config to point at 4.0
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
We are also using a network share to store the chart images which is set in appSettings
<add key="ChartImageHandler" value="storage=file;timeout=300;dir=\\server\webdata\charts\;deleteAfterServicing=false;"/>
after making the changes in the web.config the images would not display on the production server running IIS6 or my local environment running IIS7. So I made a change in all the webforms using the chart control and added ImageStorageMode="UseImageLocation".
After making that change the chart images displayed in IIS7 and IIS6 but in production IIS6 they were being placed in the webform directory and ignoring the handler location (Network Share). My local environment is working fine but I cannot get the production setting correct. All my web.config settings are below and any help would be greatly appreciated.
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=300;dir=\\SERVER\webdata\charts\;deleteAfterServicing=false;"/>
</appSettings>
<system.web>
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<compilation debug="true" defaultLanguage="vb" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<!--IIS 7 Handler Section-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<remove name="ChartImageHandler"/>
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
</system.webServer>
Since you use load balancing on servers, it is maybe not finding the correct image location. Why don't you try to use a session to store the images?
<appSettings>
<add key="ChartImageHandler" value="storage=session;timeout=20;" />
</appSettings>
Reference this for more info. We were having the same issue on a web farm. It would be wise to add deleteAfterServicing set to true.
I just developed an web app using VS 2010 framework 4 it contains login control on the default.aspx and login status in the master page everytime Irun the application It ogin using windows username and I can't even logoff any help
here is the web.config
<configuration>
<system.web>
<compilation debug="false" targetFramework="4.0">
<assemblies>
<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
<buildProviders>
<add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider"/>
</buildProviders>
</compilation>
<pages controlRenderingCompatibilityVersion="4.0"/>
</system.web>
and here is an image how it looks like
how can I prevent this behavior ?
Unless I'm misunderstanding something, authentication uses Windows Auth by default. You want to use something else. You need to change the authentication mode to forms or whatever you plan on using.
<system.web>
<!-- mode=[Windows|Forms|Passport|None] -->
<authentication mode="Forms" />
</system.web>
I just created a web page having a barebone chart with a few data points to test. On localhost, the chart is displayed as expected with no problem. But when I deployed to my webhost I got a 500 - Internal Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
Here's the web.config uploaded by Visual Studio. Could you tell me what's missing or wrong in this web.config. The appSettings look suspicious with a dir in C:, but how do I change it? Thanks.
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
</appSettings>
<system.webServer>
<handlers>
<remove name="ChartImageHandler" />
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
</system.webServer>
<system.web>
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false" />
</httpHandlers>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
</pages>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
</system.web>
</configuration>
try this link
http://asifhuddani.wordpress.com/2010/10/07/chart-control-asp-net-4-0-and-iis-7-problem/
and then delete dir=c:\TempImageFiles\; from web.config
I had the same problem, namely a 500 server error adding in the same section. Two changes resolved the 500 serve error.
replaced "add path="ChartImg.axd" verb="GET,HEAD with add path="ChartImg.axd" verb="GET,HEAD,POST".
Added line after system.webServer tag:
[validation validateIntegratedModeConfiguration="false"/]
I had to replace < with [, otherwise the preview did not show the tag.
Problem is the temporary directory. It could be because:
The directory no exists,
The user has no permission to the directory,
You are pointing to the wrong directory, or
when you move your programs form a local PC to a server you are no longer pointing to a local file, you are pointing to a URL
Solutions:
If you are using a web server, the easy and lazy solution is create a directory named temp where the aspx is located. In the same directory and give the users permission to modify.
If you are using a local PC you can use memory instead of file. No use this in the web server because is to heave for many users, but use:
<add key="ChartImageHandler" value="Storage=memory;Timeout=20;"/>
If you are using a web server, the best option is use a url instead of a file like this:
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/temp" />
You can use ~ / . or http://…
To Add permission to the ISS user, could be your user pool, windows user or any user as you used before. If you use Windows authentication, then you should grant permission to the user named “Domain Users”. Some people add permission to the user everybody. This permission should include “Modify”