AspMaxRequestEntityAllowed property specifies the maximum number of bytes allowed in the entity body of an ASP request. If a content length header is present and requires an amount of data greater than the value of AspMaxRequestEntityAllowed, IIS may return a 403 error response. You may also experience cases when an uploaded file is not present […]
Search our database
MySQL ConnectionString in ASP and ASP.Net:
Dim MyConString As String = _ "DRIVER={MySQL ODBC 5.1 Driver};SERVER=" & Server _ & ";DATABASE=" & DataBase & ";UID=" & User _ & ";PASSWORD=" & Password & ";OPTION=3;"Dim MyConString As String = _ "DRIVER={MySQL ODBC 5.1 Driver};SERVER=" & Server _ & ";DATABASE=" & DataBase & ";UID=" & User _ & ";PASSWORD=" & Password & ";OPTION=3;" […]
ASP.net viewstate error:
If you get the following error message:Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.It is due to some bugs in .Net framework, simply add in the following line in […]
How to allow uploading more than 30MB in ASP and IIS7?
Edit the web.config file and append the following lines into the file:
How to do a page redirection in ASP?
To create a page redirection in ASP, consider:You would like to redirect http://www.ipserverone.com to http://www.ipserverone.com/eshop1) Create a file named index.asp 2) Place the following command in the index.asp <% Response.Redirect("http://www.ipserverone.com/eshop") %><% Response.Redirect("http://www.ipserverone.com/eshop") %>
MSSQL (Microsoft SQLServer) ConnectionString in ASP/ASP.net:
SQL ODBC connection strings:Standard Security "Driver=; Server=Your_Server_Name; Database=Your_Database_Name; Uid=Your_Username; Pwd=Your_Password;""Driver=; Server=Your_Server_Name; Database=Your_Database_Name; Uid=Your_Username; Pwd=Your_Password;" SQL OLE DB connection strings: "Provider=SQLOLEDB; Data Source=127.0.0.1; Initial Catalog=Your_Database_Name; UserId=Your_Username; Password=Your_Password;""Provider=SQLOLEDB; Data Source=127.0.0.1; Initial Catalog=Your_Database_Name; UserId=Your_Username; Password=Your_Password;" SQL SqlConnection .NET strings: "Server=127.0.0.1; Database=Your_Database_Name; UserID=Your_Username; Password=Your_Password; Trusted_Connection=False""Server=127.0.0.1; Database=Your_Database_Name; UserID=Your_Username; Password=Your_Password; Trusted_Connection=False" SQL SqlConnection for SQL 2008: "Provider=SQLNCLI10; Server=127.0.0.1; Database=database_name; UId=user_id; Pwd=password;""Provider=SQLNCLI10; […]
How to send mail using ASP?
To send a message from your domain via ASP, here is a sample code. Assume that:Domain name: abc.com.my Mail server Host-name: mail.abc.com.my E-mail account: user1@abc.com.my password: pass4567 <% Dim objMessage Set objMessage = Server.CreateObject("CDO.Message") With objMessage.Configuration.Fields ‘Send the message using the network (SMTP over the network). .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.abc.com.my" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") […]
How to establish a database connection to a Microsoft Access?
You can use the following connnectionString: Driver="{Microsoft Access Driver (*.mdb)}; Dbq=C:\Inetpub\Vhosts\songyiwu.com\httpdocs\database\access.MDB; Uid=Admin; Pwd=;"Driver="{Microsoft Access Driver (*.mdb)}; Dbq=C:\Inetpub\Vhosts\songyiwu.com\httpdocs\database\access.MDB; Uid=Admin; Pwd=;" p/s: Please make sure that the folder name that stores the Access database file is writable as per reference on this article.
How to deploy ASP.net application?
If you are deploying your ASP.net application into your root folder, like http:// www.domainName.com, you can just upload all your files into the folder below.Directory Layout httpdocs |__ Web.config |__ Default.aspx httpdocs |__ bin |__ MyPages.dll |__ MyBusinessLogin.dll httpdocs |__ order |__ OrderViewer.aspx |__ SubmitOrder.aspxhttpdocs |__ Web.config |__ Default.aspx httpdocs |__ bin |__ MyPages.dll |__ […]