WebsitePanel 500 - Internal server error - asp.net

I am going to upload my first site that written in with Visual Studio 2012 and sql 2012 in websitepanel. but I could not understand why this site not upload up fine. I think this problem is because the Web configuration. If it is possible please see this file and help me. Thank you.
<configuration>
<appSettings>
<add key="SecurityKey" value="Syed Moshiur Murshed"/>
</appSettings>
<connectionStrings>
<add name="EshopConnectionString" connectionString="user id=*****; pwd=*****;data source=yourshop.ir_Eshop.mssql.serverpars.com; persist security info=False;initial catalog=yourshop.ir_Eshop"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<httpHandlers>
<add verb="GET" path="CaptchaImage.aspx" type="Safa.Security.Captcha.SafaCaptchaImageHandle r, SafaCaptchaControl"/>
</httpHandlers>
<customErrors mode="Off"></customErrors>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

Related

Ajax Control toolkit not working when website is published

I have website published and with Visual Studio Ultimate 2013 and Ajax control toolkit features on the page.
However, when running same, the ajax controls are not working. Am not getting any error on the browser
Here below is my webconfig file
<connectionStrings>
<add name=xxx"" connectionString="Data Source=xxxxx;Initial Catalog=Audit_Data;Integrated Security=True" providerName="System.Data.SqlClient"/>
<system.web>
<!--<sessionState mode="InProc" timeout="480" />-->
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5">
<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>
<httpRuntime targetFramework="4.5"/>
<customErrors mode="Off"/>
<pages enableEventValidation ="false">
</pages>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
Anyone can help me out of it.
thanks

Aspx Send Mail Error

Is there any problem in Web.config? When i sent mail i get this error.I think error is in the Web.config file.As you can see i dont know ASPX.I just want to edit codes and send mail to another adress
Thanks for your help
<?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>
<appSettings>
<!--# Eposta gönderme ayarları-->
<add key="epostaFromAddress" value="noreply#hkl.com"/>
<add key="epostaReply" value="noreply#hkl.com"/>
<add key="epostaFromName" value="hkl Info"/>
<add key="epostaServer" value="mail.hkl.com"/>
<add key="epostaSSL" value="0"/>
<add key="epostaPort" value="26"/>
<add key="epostaUser" value="noreply#hkl.com"/>
<add key="epostaPass" value="Gesa123456"/>
<add key="epostaTo" value="info#hkl.com"/>
</appSettings>
<connectionStrings/>
<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>
</configuration>

web config error unable to uplaod files on server on asp.net

i am using web config below to upload files in the server asp.net 4.0 but i am getting error regrading this below is my web config code what to do ?
<?xml version="1.0"?>
<configuration>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
<system.web>
<authentication mode="Windows"/>
<identity impersonate="true" />
<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>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
<sessionState timeout="1000" regenerateExpiredSessionId="true">
</sessionState>
<customErrors mode="Off" />
<machineKey validationKey="1234567890123456789012345678901234567890AAAAAAAAAA"
decryptionKey="123456789012345678901234567890123456789012345678"
validation="SHA1" decryption="Auto" />
</system.web>
<connectionStrings>
<add name="cityxisConnectionString" connectionString="Data Source=66.63.181.66;Initial Catalog=testdb;User ID=testadmin;Password=Trial#!789" providerName="System.Data.SqlClient"/>
<add name="myConnectionString" connectionString="Data Source=192.168.1.1;Initial Catalog=temp;User ID=temp;Password=temp" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.webServer>
<handlers>
<add name="AjaxFileUploadHandler" verb="POST" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
</handlers>
</system.webServer>
</configuration>
but i am Unable to upload files on server error
Access to the path 'E:\domains\mywebsite.co.in\httpdocs\cover\3128.jpg' is denied.
FileUpload1.SaveAs(Server.MapPath("/cover/" + Session["upkey"].ToString() + fileName));

sql server error online for bigrock hosting

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

Connection name 'SQL' was not found in the applications configuration or the connection string is empty

Please i have been seeing this error:
The connection name 'SQL' was not found in the applications
configuration or the connection string is empty. Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
I know for a fact that the connection name "SQL" exists and it works properly on my local machine.
I started seeing this error after i fixed this other error on my deployment server:
Compiler Error Message: BC31007: Unable to open module file
'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
by setting up the access rights as suggested here
Please i would appreciate any help on this.
thanks!
Deployment Environment : Windows Server 2003, .net 4.0
Development Environment: Widows 7, .net 4.0
Please note: The deployed application has been working perfectly well on site, for over 3 months up till last Friday evening.
The client claims nothing on the server or in their environment has changed.
My Web Config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="LoginMode" value="2" />
<add key="CustomeModules" value="True" />
<add key="TopCallersRefeshInterval" value="600" />
<add key="OperatorAccountName" value="" />
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=C:\TempImageFiles\;"/>
</appSettings>
<connectionStrings>
<add name="SQL" connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;" providerName="System.Data.SqlClient" />
<add name="SQLCustom" connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;" providerName="System.Data.SqlClient" />
</connectionStrings>
<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" explicit="true">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Entity, 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.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /></assemblies>
</compilation>
</system.web>
<system.webServer>
<defaultDocument>
<files>
<remove value="login.aspx" />
<remove value="iisstart.htm" />
<remove value="default.aspx" />
<remove value="index.html" />
<remove value="index.htm" />
<remove value="Default.asp" />
<remove value="Default.htm" />
<add value="home.aspx" />
</files>
</defaultDocument>
<handlers>
<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>
</configuration>
But, are you trying to connect to the remote database (i.e., the database on the deployment server) or to a local database.
Maybe somebody has touched the access privileges to the database...
By the way, how did you fixed the original error?
Delete every file(s) with .config format i.e. "web.user.config" but "web.config".
I hope it's help :)
Clear out the temp folder on your server. Recompile, redeploy and see if that fixes it for you. Also:
<connectionStrings>
<clear />
<remove name="SQL"/>
<add name="SQL"
connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;"
providerName="System.Data.SqlClient" />
.....
</connectionStrings>
If that does not work, try a remote debugging session:
How to: Set Up Remote Debugging
Try adding </clear> under your connection strings in web.config
connectionStrings>
<clear />
<add name="SQL" connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;" providerName="System.Data.SqlClient" />
.....
</connectionStrings>

Resources