|
Not working.
i have applied all the procedure but after creation it did not worked.
i m Chan Naseeb from Pakistan
|
|
|
|
|
what error your are getting ? can you explain in details then i can help you.?
|
|
|
|
|
This forum is for ASP.NET questions. You should ask this question in the Web Development forum.
Paul Marfleet
|
|
|
|
|
First off, my apologies for my poor english.
I've already looked everywhere to find this piece of info by myself, now I humbly come in seek of help from the gurus on this board - please help this lowly desperate developer
The million-dollar question is: is it possible to display in a page (with Response.Write() for instance) the original HTTP get/post command the browser used to open it?
For example, if I connect to my local server via telnet and issue a "GET /default.aspx" command, I need the page to output this exact command so that the end user can see what was requested.
Thanks a lot in advance!
Unix is user-friendly. It's just picky about its friends!
|
|
|
|
|
The HttpMethod and RequestType properties of the Request object will tell you what HTTP verb was used to make the request. You can get the request URL by querying the Url property of the Request object.
Paul Marfleet
|
|
|
|
|
Thanks for the quick reply on this, but that's not exactly what I'm looking for. Here's what I'm trying to accomplish:
When the user reaches the default document on my website (default.aspx), I need to detect whether he used just the domain name (e.g. www.mysite.com) or if he also included the name of the file (e.g. www.mysite.com/default.aspx). I've been digging so deep into this I got bits stuck under my nails, and this is really the only way I could think of accomplishing this task. I am wide open for suggestions though - in fact, they will be much appreciated.
|
|
|
|
|
Try to print Request.RawUrl , I guess this will give the URL visible on the address bar.
Andre Luiz V Sanches wrote: I need to detect whether he used just the domain name (e.g. www.mysite.com) or if he also included the name of the file (e.g. www.mysite.com/default.aspx)
This looks strange, why do you want to do this ?
|
|
|
|
|
No luck, Request.RawUrl will print out the page name even if the user did not explicitly typed it in.
N a v a n e e t h wrote: This looks strange, why do you want to do this ?
it's a request from the SEO expert who's working with us.
I wonder if there are any low-level IIS API calls I could use from within .NET to capture the exact HTTP command that was sent to the server. Any ideas?
|
|
|
|
|
Hi,
I am about to write a web application based on a MSSQL2005 database.
It will start with a login and my own membership class. (using VS2005 login control, works already)
When logging in several rights might be assigned to a user such as allowing him to create items and subitems or not.
Now my question is, how do I pass these rights to another page? Is it wise to use for every right (e.g. create part number (yes/no); create failure(yes/no); create corrective action (yes/no)) a session variable or is there another way ?
Is there any way to forward variables or even classes as (e.g.)User (User.CreateRootCause = true; ) or maybe in an array ?
Thanks in advance!
daple
Never give up, never surrender !
|
|
|
|
|
You are going to put something in the session. What that is, is up to you. Ideally, I'd put an array of ids that represent roles, and then do role based security through the site.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
How can I create a row in unbound gridview that the content is a hyperlink? (I don't want to bind gridview to DB) (yeah it's not logical, but I want to do it!)
Best wishes
|
|
|
|
|
I'm trying to change the file permissions of one of my .aspx files to include only one group (of which I am a member). However, when I try and authenticate, it tells me my credentials are invalid. If I do this with any other type of file (eg. html), it works, pops up the authentication box, I enter my password, page is displayed. Only happens with .aspx I'm stumped. :/
|
|
|
|
|
Is there a way to overcome the
"The state information is invalid for this page or might be corrupted."
error in firefox
Bye
|
|
|
|
|
Doses it happens every time Accsessing or Postback?
Have you tried Internet Explorer?
|
|
|
|
|
occurs when i do postbacks. I wait until the page is loaded but when i do it time and again i get it in firefox.
I have to fix this error for firefox.
Bye
|
|
|
|
|
Try to disable viewstate for each control and se if it is any better. Did you used Windows Update and updated your .net platform?
|
|
|
|
|
Hi,
.NET 1.1 Question:
I have httpModule that implements IHttpModule in order to rewrite url´s. I need to store a value or in some way maintain a value between different http requests. I have been trying to accomplish this by implementing the IRequiresSessionState interface and with numerous event handlers. Is there anyone who know how to deal with this issue or can push me in the right direction?
Thanks in advance
Regards
/Rip
|
|
|
|
|
HttpContext.Current.Session? HttpContext.Current.Cache?
Jon Sagara
Once again, the conservative sandwich-heavy portfolio pays off for the hungry investor! *slurp* Oh, I'm ruined!
-- Dr. Zoidberg
.NET Blog | Personal Blog | Articles
|
|
|
|
|
I guess session will be available in PrerequestHandlerExecute event. Have you tried there ?
|
|
|
|
|
Hi, thanks for your reply. I have tried that event handler. I may do something wrong in the implementation...
Regards
/Christoffer
|
|
|
|
|
How to stop, start a job already scheduled in the "Windows Scheduled Task" in the web server using ASP.Net?
Al
|
|
|
|
|
Hi Guys,
can anyone help me with with my code. i have a datalist and some textfield with a button to submit. once submitted, the page should rebind it'self, but it seems not working. see my code below:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class mssgboard_Messageboard : System.Web.UI.Page
{
SqlConnection datalistconn;
SqlDataReader datalistdr;
SqlCommand datalistcmd;
SqlConnection conn;
//SqlDataReader dr;
SqlCommand cmd;
void Bindata()
{
try
{
datalistconn = new SqlConnection(ConfigurationManager.ConnectionStrings["CmsDb"].ConnectionString);
datalistcmd = new SqlCommand("SELECT nam,phone_number,email,comments FROM tbl_mssgboard ORDER BY refid DESC", datalistconn);
datalistconn.Open();
datalistdr = datalistcmd.ExecuteReader();
if (datalistdr.Read())
{
DataList1.DataSource = datalistdr;
DataList1.DataBind();
}
}
catch (Exception exc)
{
Response.Write(exc.Message);
}
finally
{
datalistdr.Close();
datalistconn.Close();
}
}
protected void Page_Load(object sender, EventArgs e)
{
Bindata();
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
try
{
conn = new SqlConnection(ConfigurationManager.ConnectionStrings["CmsDb"].ConnectionString);
cmd = new SqlCommand("INSERT INTO tbl_mssgboard(nam,phone_number,email,comments) VALUES(@nam,@phone_number,@email,@comments)", conn);
cmd.Parameters.Add("@nam", SqlDbType.VarChar,50);
cmd.Parameters.Add("@phone_number", SqlDbType.VarChar, 50);
cmd.Parameters.Add("@email", SqlDbType.VarChar, 50);
cmd.Parameters.Add("@comments", SqlDbType.VarChar, 50);
cmd.Parameters["@nam"].Value = this.txtname.Text;
cmd.Parameters["@phone_number"].Value = this.txtphone.Text;
cmd.Parameters["@email"].Value = this.txtemail.Text;
cmd.Parameters["@comments"].Value = this.txtcomments.Text;
conn.Open();
cmd.ExecuteNonQuery();
this.txtname.Text = "";
this.txtphone.Text= "";
this.txtemail.Text = "";
this.txtcomments.Text = "";
Bindata();
}
catch (Exception exc)
{
Response.Write(exc.Message);
}
finally
{
conn.Close();
}
}
}
i will appreciate your professional expertise.
thanks
|
|
|
|
|
datalistconn is declared as global.
When postback, Excepton Occours, becase you can't open SqlConnection if it is already opend
|
|
|
|
|
I am trying to begin a simple web service application in ASP.NET. The app is to FlightRight, For this simple example, the service will support a single method, called FlightStatus. Clients call this method, passing it a flight number, and our service will return the expected arrival time of the flight. Simple right. not for me . Keep getting this error. Can somebobody please tell me where i am going wrong.
Code here
<WebService(Namespace="http://localhost/FlyRight/", _<br />
Description="Flight Information Service") _<br />
Public Class FlightStatus<br />
<br />
<WebMethod(Description="Submit the Flight Number _<br />
and a time will be returned.")> _<br />
Public Function ArrivalTime(ByVal FlightNum As String) As String<br />
<br />
Dim theTime As String<br />
<br />
Select Case FlightNum<br />
Case 1001<br />
theTime = "12:30 AM EST"<br />
Case 2002<br />
theTime = "4:15 PM EST"<br />
Case Else<br />
theTime = "INVALID FLIGHT NUMBER"<br />
End Select<br />
Return theTime <br />
End Function
Error
Access to the path "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\flyright\1c2b63af\df178987" is denied.
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.UnauthorizedAccessException: Access to the path "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\flyright\1c2b63af\df178987" is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true">, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
|
|
|
|
|
Sounds like the user that you are impersonating, or the aspnet user does not have the appropriate privleges to run asp.net temp files.
|
|
|
|