Aspx Send Mail Error - asp.net

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>

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

Web Form charts: No http handler was found for request type 'GET'

I'm getting this error: No http handler was found for request type 'GET'. I figure the reason is with an incorrect web.config, as suggested in the answer to another question. However, following these suggestions doesn't solve my problem completely. Now I'm getting a 500- Internal server error, or 404- Resource *.aspx is not found (this error is indeterminate, 500 at one point and 404 at another). This error only exists after I've deployed to a DEV server. The application runs fine in DEBUG mode.
Here's my config file.
<configuration>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<defaultDocument>
<files>
<add value="main.aspx" />
</files>
</defaultDocument>
<handlers>
<add name="ChartImg" verb="*" 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>
<customErrors mode="Off"/>
<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.5">
<assemblies>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5" />
</system.web>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
</configuration>
I also added this tag to my .aspx page:
<%# Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
The solution is this
in web.conf add
<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>
and add
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=C:\inetpub\wwwroot\temp\;" />
</appSettings>
change the dir to a folder of your choice

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));

WebsitePanel 500 - Internal server error

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"/>

Asp.net 4.5 Routing is not working

I I have deployed a website on Server,in the developement phase I was working fine , but when I deployed it on server it shows 404 error
When I write actual aspx page name on server it shows page.. but in case of virtual page name it through an error
www.example.com/welcome.aspx is fine
but
www.example.com/Welcome is invalid.
can you examine my configuration file and let me know where exactly I am wrong.
Thanks..
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="UrlRoutingModule"/>
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</modules>
<handlers>
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"/>
</handlers>
</system.webServer>
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="ConString" connectionString="Server=********;Database=***;uid=***********;pwd=*************" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<customErrors mode="On" defaultRedirect="Error" redirectMode="ResponseRedirect"></customErrors>
<httpModules>
<add name="CuteWebUI.UploadModule" type="CuteWebUI.UploadModule,CuteWebUI.AjaxUploader" />
</httpModules>
</system.web>
</configuration>

Resources