ASP.NET - i created a webapplication project.now i want to run it from server,  ASP.NET - i created a webapplication project.now i want to run it from server,

Asked By sweta *
17-Feb-11 12:49 AM
thank you for previous help!
now i hav query,i want to run my application on server,i m using SQL server!

I tried to follow these steps but I get the message "Internet Explorer cannot display the webpage".

plz help me!

  Mash B replied to sweta *
17-Feb-11 12:49 AM
You can make use of inbuilt tool of visual studio publishing tool. The Publish Web Site tool precompiles the files in a Web site project and then writes the output to a folder that you specify.

Refer below link for complete step by step procedure

http://msdn.microsoft.com/en-us/library/20yh9f1b.aspx
  sweta * replied to Mash B
17-Feb-11 12:51 AM
i alredy tried bt its not working!
  Rohan Dave replied to sweta *
17-Feb-11 01:21 AM
did you create virtual directory in your web server ? did you check the permission and authentication on your virtual directory ?
  sweta * replied to Rohan Dave
17-Feb-11 01:28 AM

yes!

it showing exception

 

Server Error in '/Web' Application.

Failed to access IIS metabase.

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.

Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HostingEnvironmentException: Failed to access IIS metabase.]
   System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +3591442
   System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath2.MapPath(String siteID, VirtualPath vpath) +9
   System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +169
   System.Web.CachedPathData.GetConfigPathData(String configPath) +389
   System.Web.CachedPathData.GetConfigPathData(String configPath) +243
   System.Web.CachedPathData.GetApplicationPathData() +68
   System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +3536567
   System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +189


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

  Rohan Dave replied to sweta *
17-Feb-11 01:36 AM
try to reset your IIS and your dot net settings with below command..

Visual Studio command prompt :-

aspnet_regiis -i

Or

Dos Command Prompt :-

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i
  sweta * replied to Rohan Dave
17-Feb-11 01:40 AM
now it shows:

The website declined to show this webpage

 HTTP 403
 

Most likely causes:

  • This website requires you to log in.
 

What you can try:

 

Go back to the previous page.

 

More information More information

  Rohan Dave replied to sweta *
17-Feb-11 01:48 AM
The error is coming up because of Permission settings in your virtual directory for your application. how you are publishing your website on server ?
  sweta * replied to Rohan Dave
17-Feb-11 01:51 AM

On the Build menu, click Publish Web Site.

plz tell me how to set permission?

thank you!

  Anoop S replied to sweta *
17-Feb-11 02:03 AM
Refer this for how to change virtual directory permission
http://download1.parallels.com/Plesk/Plesk8.3/Doc/en-US/plesk-8.3-win-administrators-guide/29056.htm
  Rohan Dave replied to sweta *
17-Feb-11 02:05 AM
okay Coool..

do one thing - go to your virtual directory of your application..

step 1 ) Right click on your web site virtual directory -> click on Properties
step 2 ) on Directory tab, just make sure you have checked  Read, Write, Direcotry Browsing, Log Visit checkboxes.
step 3 ) For Execute Permission, select Scripts Only or Scripts and Executables option from dropdown.
step 4 ) Click on Directory Security tab, click on Edit button of Authentication and Access Control section. It will open up dialog box.
step 5 ) Double check all the security settings and make sure they are set as per your configuration. I mean Anonymous or Windows Authentication ..
  sweta * replied to Rohan Dave
17-Feb-11 02:11 AM

nw it showing like ths:

 

 

localhost - /Web/


[To Parent Directory]

Thursday, February 17, 2011 12:38 PM 338 AboutUs.aspx
Thursday, February 17, 2011 12:38 PM <dir> App_Data
Thursday, February 17, 2011 12:38 PM <dir> App_Themes
Thursday, February 17, 2011 12:38 PM <dir> bin
Thursday, February 17, 2011 12:38 PM 2380 CatalogCreateR.aspx
Thursday, February 17, 2011 12:38 PM 1504 CatalogCreateResult.aspx
Thursday, February 17, 2011 12:38 PM 3125 CatalogDelete.aspx
Thursday, February 17, 2011 12:38 PM 262 CatalogId.aspx
Thursday, February 17, 2011 12:38 PM 2550 CatalogModify.aspx
Thursday, February 17, 2011 12:38 PM 1676 CatalogViewR.aspx
Thursday, February 17, 2011 12:38 PM 3402 ChangePassword.aspx
Saturday, February 12, 2011 10:17 AM 64 Compatibility.css
Thursday, February 17, 2011 12:38 PM 435 Default.aspx
Thursday, February 17, 2011 12:38 PM 655 Default2.aspx
Thursday, February 17, 2011 12:38 PM 980 Default3.aspx
Thursday, February 17, 2011 12:38 PM 186 Detail.aspx
Thursday, February 17, 2011 12:38 PM 696 Logout.aspx
Thursday, February 17, 2011 12:38 PM 3409 MacIdSearch.aspx
Friday, January 28, 2011 4:08 PM 1707 MacProgrammer.sln
Thursday, February 17, 2011 12:38 PM 412 Main.aspx
Thursday, February 17, 2011 12:38 PM 1387 RangeCreate.aspx
Thursday, February 17, 2011 12:38 PM 530 RangeCreateHome.aspx
Thursday, February 17, 2011 12:38 PM 1304 RangeDelete.aspx
Thursday, February 17, 2011 12:38 PM 5826 Rangeview.aspx
Thursday, February 17, 2011 12:38 PM 1953 RangeViewR.aspx
Thursday, February 17, 2011 12:38 PM 2269 Register.aspx
Thursday, February 17, 2011 12:38 PM 1141 ReProg.aspx
Thursday, February 17, 2011 12:38 PM 6517 ReProgramR.aspx
Thursday, February 17, 2011 12:38 PM 2646 ReProgramReports.aspx
Thursday, February 17, 2011 12:38 PM 2099 ReProgramResult.aspx
Thursday, February 17, 2011 12:38 PM 2063 result.aspx
Thursday, February 17, 2011 12:38 PM 3492 SerialNumberSearch.aspx
Wednesday, February 03, 2010 9:55 PM 1190 style.css
Thursday, February 17, 2011 12:38 PM 1072 SubMain.master
Tuesday, February 08, 2011 4:33 PM 129 Table.css
Tuesday, February 08, 2011 4:39 PM 239 Td.css
Thursday, February 17, 2011 12:38 PM 5272 UCreateR.aspx
Thursday, February 17, 2011 12:38 PM 1724 UDeleteProfile.aspx
Thursday, February 17, 2011 12:38 PM 3123 UserCreateResult.aspx
Thursday, February 17, 2011 12:38 PM 3125 userUpdateResult.aspx
Thursday, February 17, 2011 12:38 PM 1576 UserViewR.aspx
Friday, January 21, 2011 3:04 PM 8272 web.config

 

 

 

  Rohan Dave replied to sweta *
17-Feb-11 02:13 AM
did you have set any start up page in your project ? like default.aspx or index.aspx ?
  Rohan Dave replied to sweta *
17-Feb-11 02:14 AM
another this with previous thread is , if you click on any page from below list on your browser, is it opening up that particular page or giving error ?
  sweta * replied to Rohan Dave
17-Feb-11 02:21 AM

giving error

 

its open the login page n then gives error!

 

Server Error in '/Web' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0433: The type 'Main' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\17c6a76d\c2623c31\assembly\dl3\6c05bb46\4904648a_71cecb01\App_Web_bry95i8g.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\17c6a76d\c2623c31\assembly\dl3\d043dc54\f1cb2a8a_71cecb01\App_Web_wdngmcc0.DLL'

Source Error:

Line 110:    
Line 111:    [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 112:    public class main_aspx : global::Main, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler {
Line 113:        
Line 114:        private static bool @__initialized;

Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\17c6a76d\c2623c31\App_Web_main.aspx.cdcab7d2.wvk4teqa.0.cs    Line: 112



  Rohan Dave replied to sweta *
17-Feb-11 02:32 AM
oh god

do one thing - right click on your project solution - > click on Clean Solution. Then again Rebuild the Solution and publish it again on your web server and try to run it..
  sweta * replied to Rohan Dave
17-Feb-11 03:32 AM
why not working login page?
  Rohan Dave replied to sweta *
17-Feb-11 03:37 AM
did you clean your solution and rebuild it again and publish it again ? does your application works fine on local host ?
  sweta * replied to Rohan Dave
17-Feb-11 03:58 AM
yes,whole pages r work fine,only Login page giving error.
i used login control on my page.
is we hv to configure externally,if yes then how?
i didnt used authentication n authorisation of asp.net
  Rohan Dave replied to sweta *
17-Feb-11 04:08 AM
no you don't need to do any external seetings. can you send me your aspx and aspx.cs file of your login page ?
  sweta * replied to Rohan Dave
17-Feb-11 05:22 AM

 

aspx:


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="pgLogin.aspx.cs" Inherits="Login" Title="Login"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Login</title>
    <style type="text/css">
    .style1 {
    width: 1195px;
    height: 125px;
    }
    .style2
    {
    height: 125px;
    }
    </style>
</head>
<body style="background-color: #FFFFFF">
    <form id="form1" runat="server" >
    <div >
    <table style="height: 354px">
    <tr>
    <td class="style2">
    </td>
    <td class="style1">
    </td>
    </tr>
    <tr>
    <td colspan ="2" align="center" >    
    <asp:Login ID="LoginGateway" runat="server" BackColor="#EFF3FB" Height="208px"
    Width="389px" style="margin-top: 0px" onloggingin="LoginGateway_LoggingIn"
    BorderColor="#B5C7DE" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px"
    Font-Names="Microsoft Sans Serif" Font-Size="Small" ForeColor="#333333"  
    >
    <TextBoxStyle Font-Size="Small" />
    <LoginButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid"
    BorderWidth="1px" Font-Names="Microsoft Sans Serif" Font-Size="Small"
    ForeColor="#284E98" />
    <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
    <TitleTextStyle BackColor="#507CD1" Font-Bold="True" Font-Size="Small"
    ForeColor="White" />
    </asp:Login>
    </td>
    </tr>
    </table>
    </div>
    </form>
</body>
</html>






aspx.cs:




public partial class Login : System.Web.UI.Page
{
    SqlDataReader reader;
    string strPass = null;
    string strConnectionString = null;
    DataAccessLayer layer;
    protected void Page_Init(object sender, EventArgs e)
    {
    strConnectionString = WebConfigurationManager.ConnectionStrings["Gateway"].ConnectionString;
    layer = new DataAccessLayer(strConnectionString);

    }
    protected void Page_Load(object sender, EventArgs e)
    {
    if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
    {
    Request.Browser.Adapters.Clear();
    }

    }
   
    protected void LoginGateway_LoggingIn(object sender, LoginCancelEventArgs e)
    {
    
    
    string strName = LoginGateway.UserName;
    string strPassword = LoginGateway.Password;
    string strQuery = "Select Password from Login where [User]='"+ strName+"'" ;
    layer.Open();
    object objResult = layer.ExecuteScalar(strQuery);
    strPass = objResult.ToString();   
    layer.Close();
    
    strQuery = null;
    if (strPass  == strPassword)
    {
    Session["UserName"] = strName;
    Session["Password"] = strPass;
    Response.Redirect("~/Main.aspx");    
    
     
    }
     
     
    }
 

}

 

Thank you!

 plz help me!

 

  Rohan Dave replied to sweta *
17-Feb-11 06:26 AM
it's strange..your code looks correct.. are you getting this error "The type 'Main' exists in both  ... " ?
  sweta * replied to Rohan Dave
17-Feb-11 11:35 PM

i m nt getting?wt to do?

n yes,m using dll in bin folder,classes in app_code folder,so any issue related to dll?

plz help me!

thank you!

  sweta * replied to Rohan Dave
18-Feb-11 01:42 AM
yes!finally i hav done it!
thank you very much for ur precius time its realy help me alot!
  Rohan Dave replied to sweta *
18-Feb-11 05:44 AM
oh cooool..glad to hear... how did you solve it ? Can you please share with me or mail me on rohan.dave7784@gmail.com ?
  sweta * replied to Rohan Dave
18-Feb-11 05:51 AM
i have two dlls,say dll1.dll and dll2.dll.Both of them have a class by name Main.If I put both the dll into the Project through Add Reference and do not specify a namespace to distinguish the Main type in the code there will be a runtime error;
So add a namespace in both of the dll's class named Main and recompile it.
  Rohan Dave replied to sweta *
18-Feb-11 05:56 AM
oh great..are you doing a job or studying ?
Create New Account
help
Frequently asked Interview Questions in ADO.Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B an Assembly how do you go about it? (A) What is Manifest? (B) Where is version information stored of an assembly? (I) Is versioning applicable to private assemblies? (B) What is GAC? (I) what is the concept of strong
Migrating to Visual Studio.NET 2003: A Developer Perspective Migrating to Visual Studio.Net 2003: A Developer - oriented analysis By Peter A. Bromberg, Ph.D. Printer - Friendly Version Peter Bromberg A new Platform On April 24, 2003 Microsoft Windows Server 2003 and Visual Studio .NET 2003 are officially released. Many developers and beta testers (myself included) have been feverishly working First, lets put this whole thing in perspective. About 1997, the internal development teams in Microsoft began to have a kind of "epiphany". We had XML coming on the scene in been experimented with in the form of WebClasses with VB 6.0. The gurus at Microsoft learned a lot from this, and at the same time, they were dealing with the such as SOAP and webservices, XSLT, and other enterprise solutions that would not only improve Microsoft's dominance in the development and OS space, but also provide the platform for strong
other are not processing. and am getting below one in log file as error cause: Microsoft Windows Installer 4.5 Update (x86) - Windows XP: [2] CGenericComponent::Install() expects the setup file for Microsoft Windows Installer 4.5 Update (x86) - Windows XP, but the file is not available. [08 ISetupManager::InternalInstallManager() with HRESULT -2147467259. [08 / 10 / 11, 14:26:00] VS70pgui: [2] DepCheck indicates Microsoft Windows Installer 4.5 Update (x86) - Windows XP is not installed. [08 / 10 / 11, 14:26:00] VS70pgui: [2] DepCheck indicates Microsoft Visual F# 2.0 Runtime was not attempted to be installed. [08 / 10 / 11, 14 26:00] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio Macro Tools was not attempted to be installed. [08 / 10 / 11, 14:26 not attempted to be installed. [08 / 10 / 11, 14:26:00] VS70pgui: [2] DepCheck indicates .NET Framework 4 Multi-Targeting Pack was not attempted to be installed. [08 / 10 / 11, 14:26:01] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio 2010 Professional - ENU was not attempted to be installed. [08 / 10 / 11, 14
Interview Questions for .NET Framework This article is specially for the users those are in development or want to be a .net developer • To test a Web Service you must create a windows application or web application to consume this service? It is True / False? FALSE How many classes can a single.NET DLL contain? Answer1: As many Answer2: One or more What are good ADO.NET object(s) to replace the ADO Recordset object? The differences includes In ADO, the in-memory representation of data is the recordset. In ADO.net, it is the dataset A recordset looks like a single table in ADO In contrast a dataset is a collection of one or more tables in ADO.net ADO is designed primarily for connected access ADO.net the disconnected access to the database