A "web site" has its code in a special App_Code directory and it's compiled into several DLLs at runtime. A "web application" is precompiled into one single DLL that is built and copied in the Bin directory.
A web site is just a group of all files in a folder and sub folders. There is no project file. All files under the specific folder - including your word documents, text files, images etc are part of the web site.
You have to deploy all files including source files (unless you pre compile them) to the server. Files are compiled dynamically during run time.
In website since there is no project file, there is nothing that you can double click to open the web site in Visual Studio for editing. You have to open Visual Studio first and then open the site from Visual Studio
public void terminate()
{
Process[] plist = Process.GetProcesses();
foreach (Process p in plist)
{
try
{
if (p.MainModule.ModuleName.ToUpper() == "WEBDEV.WEBSERVER.EXE")
{
//p.Kill();
}
if (p.MainModule.ModuleName.ToUpper() == "IEXPLORE.EXE")
{
p.Kill();
}
}
catch
{
}
}
}
if (GridView1.Rows.Count > 0)
{
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
this.EnableViewState = false;
Response.Write("
");
Response.Write("
|
Response.Write("");
Response.Write("
");
gvRes.HeaderStyle.Font.Bold = true;
gvRes.HeaderStyle.BackColor = System.Drawing.Color.Black;
System.IO.StringWriter tw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
HtmlForm frm = new HtmlForm();
this.Controls.Add(frm);
frm.Controls.Add(gvRes);
frm.RenderControl(hw);
Response.Write(tw.ToString());
Response.End();
}
you can get the details by clicking on ? on the dialog box that shows this error
or the flow is
Open the following
Tools > Options > Designers > Table and Database Designers > Prevent saving changes that require table re-creation. Just Turn this option off and you will be able to save the tables again.
and now you can save changes to all tables of any database.
Function to Encrypt-Decrypt Connection String in Web.Config File
Posted by: Quadtechindia in Asp.netCode to Encrypt Connection String in Web.Config File
using System.Configuration;
using System.Web.Configuration;
using System.Web.Security;
public void EncryptConnectionString()
{
Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);
ConfigurationSection section = config.GetSection("connectionStrings");
if (!section.SectionInformation.IsProtected)
{
section.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");
config.Save();
}
}
public void DecryptConnectionString()
{
Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);
ConfigurationSection section = config.GetSection("connectionStrings");
if (section.SectionInformation.IsProtected)
{
section.SectionInformation.UnprotectSection();
config.Save();
}
A potentially dangerous Request.Form value was detected from the client side
Posted by: Quadtechindia in dotnetIf you face such above mentioned error on inserting a value then that value might be containing anchor tags(< or >). If you want to insert these values you have to write
ValidateRequest="false" in page directive (first line of .aspx file)
Example:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="xyx.aspx.cs" Inherits="xyz" ValidateRequest="false" %>
Write following statement in Query Window
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
* The product version (10.0.1600.24)
* The product level (RTM)
* The edition (Enterprise)
Inorder to find out version of sql server write the following statements in query window
SELECT @@VERSION