ورود

View Full Version : مشکل در ASP.NET



Bahmany
دوشنبه 30 مرداد 1385, 11:33 صبح
سلام
من آخر تازه کارام تو ASP
یه پروژه کوچیک با C# طراحی کرده ام و می خواهم روی وب سایتم اجرا کنم
متاسفانه بروی کامپیوترم اجرا میشه ولی رو وب سایت اجرا نمی شه و error میده


با تشکر:گیج:

reza_rad
دوشنبه 30 مرداد 1385, 12:15 عصر
error میده

چه اروری میده؟

اَرژنگ
دوشنبه 30 مرداد 1385, 12:26 عصر
سلام
من آخر تازه کارام تو ASP
یه پروژه کوچیک با C# طراحی کرده ام و می خواهم روی وب سایتم اجرا کنم
متاسفانه بروی کامپیوترم اجرا میشه ولی رو وب سایت اجرا نمی شه و error میده


با تشکر:گیج:
دوست عزیز، ما مخلص شما هستیم ولی الان بعد از چند ماه در این فروم پلکیدن دیگه داره سخت مشیه.
شما خودتان را بگزارید به جایه ما، فکر کنید ما نه به کد شما دسترسی داریم و نه اینکه هیچ چیزی در مورد اروری که شما دریافت میکنید میدونیم.
الان هر کی که به این سوال بخواد جواب بده همین حرف من را میزنه، اگر شما از اوّل ۲ دقیقه وقت میگزاشتید الان به جایه این جواب گله دار، به جاش جوابتان را داشتید و همه چیز تمام شده بود.
قبل از اینکه اساتید به سوالتان نگاه کنند لطفاً ویرایش کنید و یکمی بیشتر توضیح بدید.
بازهم بدونید ما از شما شکایت نداریم و منتظر به کمک نشستیم.
با احترام

Bahmany
دوشنبه 30 مرداد 1385, 12:44 عصر
سلام
این لینکی که خدمتون عرض کردم
http://www.besttcp.com/ASPTEST/Webform1.aspx
خداخیرتون بده

سورس Webform1.aspx



<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="Web3.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 93px; POSITION: absolute; TOP: 73px" runat="server"></asp:TextBox>
<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 125px; POSITION: absolute; TOP: 118px" runat="server" Text="Button"></asp:Button>
</form>
</body>
</HTML>









سورس WebForm1.aspx.cs






using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Web3
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button1;


private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}


/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Button1_Click(object sender, System.EventArgs e)
{
TextBox1.Text="bahmany";
}
}
}











اینهم سورس Web.config


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to
false will improve runtime performance of this application.
Set compilation debug="true" to insert debugging symbols (.pdb information)
into the compiled page. Because this creates a larger file that executes
more slowly, you should set this value to true only when debugging and to
false at all other times. For more information, refer to the documentation about
debugging ASP .NET files.
-->
<compilation defaultLanguage="c#" debug="true" />
<!-- CUSTOM ERROR MESSAGES
Set customError mode values to control the display of user-friendly
error messages to users instead of error details (including a stack trace):
"On" Always display custom (friendly) messages
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommended for security purposes, so
that you do not display application detail information to remote clients.
-->
<customErrors mode="RemoteOnly" />
<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows", "Forms",
"Passport" and "None"
-->
<authentication mode="Windows" />
<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<!-- SESSION STATE SETTINGS
By default ASP .NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
-->
<sessionState mode="InProc" stateConnectionString="tcpip=216.139.227.195" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20" />
<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>
</configuration>

reza_rad
دوشنبه 30 مرداد 1385, 12:51 عصر
توی web.config برید و custom error رو ON کنید تا معلوم بشه مشکل کار کجاست...

Bahmany
دوشنبه 30 مرداد 1385, 13:10 عصر
این کار رو انجام دادم و بعد هم upload کردم.

reza_rad
دوشنبه 30 مرداد 1385, 13:21 عصر
ببخشید اشتباه شد.
mode رو Off کنید.

Bahmany
دوشنبه 30 مرداد 1385, 14:01 عصر
ممنون انجام دادم

اَرژنگ
دوشنبه 30 مرداد 1385, 14:12 عصر
ممنون انجام دادم
اگر دسترسی به IIS ندارید به به جایه قرار دادن پروژکت در ASPTest دایرکتوری ، ببریدش یک دایرکتوری بالاتر.