|
hey, thanks for ur reply. but i don't need the whole site to use https as it's not user-friendly and most users dont try to access the site using https. The thing is that i need to use one page as https ie.., if i login using RSA secure ID after logged in the page we access should only be shown in https to specify that they are logged in to a secure page. So pls help me.
|
|
|
|
|
SSL is not the page its the way the site is talking to the client. So what most companies do it create a new virtual site.
Example:
Main Site:
www.mysite.com
Secure Site:
secure.mysite.com
From your main site just redirect to the secure site and it'll work the way you want.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Thanks once again. But the thing is i don't know how to redirect to one single page and make it as https after logging in. Pls help me how to do the process.
|
|
|
|
|
Make both sites point to the same directory. Just redirect to https://www.mysite.com/mypage.aspx.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
hi all
I am developing a asp.net application using vb. The problem i am facing is in one of the form i have a import button for text files that i need to save it in one of the folder(Resume) inside the application, I tried with all write permission but every time get a error. code what i wrote is
Private Sub CmdUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdUpload.Click
If File1.PostedFile Is Nothing Then
Me.lblResult.Text = "No File Selected to Upload."
Exit Sub
End If
'Retrieve file information and upload to server.
Dim strName As String
strName = System.IO.Path.GetFileName(File1.PostedFile.FileName)
Try
File1.PostedFile.SaveAs(Server.MapPath("Resumes/" & strName))
Me.lblResult.Text = """" + strName + """ was uploaded successfully."
Catch ex As Exception
Me.lblResult.Text = "An Error Occured While Uploading File."
End Try
End Sub
End Class
*******************************
Error what i am getting while debugging is
+ ex {System.UnauthorizedAccessException} System.Exception
***********************************
Pl help me
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
Prakash_Mishra wrote: Error what i am getting while debugging is
+ ex {System.UnauthorizedAccessException} System.Exception
it is related to the registry key. so RegistryKey.SetAccessControl Method will help you to solve this problem.
For Details[^]
Regards,
Satips.
|
|
|
|
|
Hi,
I have been facing the variable scope problem since I started coding in ASP.NET (C#).
A variable I declare globally seems to be reset whenever it gets out of a function block.
For example, I have a label control named "lblURL" and a button named "cmdShow" on a web form with the following code:
<br />
public class MyClass: System.Web.UI.Page {<br />
private string _url = "";<br />
<br />
private void Page_Load(object sender, System.EventArgs e) {<br />
this.SetUrl();<br />
}<br />
<br />
private void SetUrl(){<br />
_url = "http://www.myWebSite.com";<br />
}<br />
<br />
private void cmdShow_Click(object sender, System.EventArgs e) {<br />
this.lblURL.Text = _url;<br />
}<br />
}<br />
When clicking on a button, I expect the label to display "http://www.myWebSite.com".
But it turns out to be blank.
I have tried debugging and found that the _url variable has been set properly in the SetUrl function.
But the value is gone after I click the button (_url = "" in cmdShow_Click() function).
Personally, I think it's the IsPostBack issue since I've never had this kind of problem with Windows Form programming.
But I don't know how to solve it.
Someone please tell me how it works and how to solve it.
KiT
Never wait for a chance to come, Believe in your own potential and go get it!
|
|
|
|
|
According to the code, it should work as you expected...
This is because when you press the button, both the page load event and the button click event will be fired.
The problem may be due to label box itself.
Try to set the label box property at design time and see if it is displayed
in the label box when you first run the application.
Or
try to replace _url with Session["_url"].
Regards,
Arun Kumar.A
|
|
|
|
|
Using the Session variable is what I did.
However, I wonder if there is any other way to work with it.
Thank you very much.
KiT
Never wait for a chance to come, Believe in your own potential and go get it!
|
|
|
|
|
What about ViewState?
Regards,
Arun Kumar.A
|
|
|
|
|
KiTsuNeKo wrote: A variable I declare globally seems to be reset whenever it gets out of a function block.
There are no global variables in .NET. You have declared a member variable in your MyClass class.
Furthermore, you are expecting your variable to keep it's value between postbacks, but a new page object is created for each request, so your variable doesn't even exist between requests.
However, for every request the Page_Load method should be executed, so your variable should be recreated and repopulated for every request.
Set a breakpoint in Page_Load and verify that it's called twice. It should be called when the page is first created, then when you click the button it should be called again when the page is recreated for the postback.
KiTsuNeKo wrote: Personally, I think it's the IsPostBack issue since I've never had this kind of problem with Windows Form programming.
Web programming is fundamentally different from windows form programming. A windows application is a state holding stand-alone client program, while a web application is a stateless client-server application.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thank you very much.
Currently, I am using a Session variable to hold the value.
Is there any other way to work with this issue?
KiT
Never wait for a chance to come, Believe in your own potential and go get it!
|
|
|
|
|
I am developing an Asp.net 2.0 (VB.Net) application. I am trying to develop a feature to export a dataset to excel.
After clicking export to excel button events, It gives pop up window asking 'do you want to open save or cancel', When I click 'open'
an issue accurs:
when ever it open with excel 2007 It gives another alert popup window saying that "Do you want to open this file" with two buttons Yes or No when I click one of them it opens.( it opens without any alert popup message window in excel 2000, 2003 and all versions of excel),
I am asked to avoid alert message, While opening in Excel 2007.
I have tried both . Excel(xsl) and .csv methods.
Please let me know if you have some other methods for exporting Dataset(datatable) to Excel with out this alert message that I get in Excel 2007.
I would appreciate your help on this.
Thanks in Advance
Mohamed Arif
PS: I want the excel report's header and column headers to dynamically change according to the user selection in the previous page, But the data being the same from dataset(datatable).
|
|
|
|
|
Do you have any example or code snippet for doing export to excel by using Xml templates,If so please send me. I would appreciate your help on this.
Thanks
Mohamed
|
|
|
|
|
Hi,
I have a table and I want to display employeesName in my GridView that when I click on any item it opens the
C:\file1.jpg or C:\file2.jpg. How can I do this with hyperlinks.
Please help me this is very urgent.
EmployeeID EmployeeName photo URL
----------- ------------------------------------------ --------------------------------------------------
1 mary file1.jpg C:\file1.jpg
2 johnes file2.jpg C:\file2.jpg
3 william file3.jpg C:\file3.jpg
seema
|
|
|
|
|
I am a beginner trying to use ASP.NET for web development and have installed .Net framework 2.0, Visual Studio 2005 professional edition and Internet Information Services (IIS). I am having a problem with the configuration as a result I can't run the page. I normally get the error message "unable to start debugging on the web server. The server does not support debugging of ASP.NET or ATL Server Applications"
Please can any one help me with this problem? Thanks.
The only permanent situation is change
|
|
|
|
|
Go to the IIS.
Right click the "virtual directory" of your application.
Select "Properties".
Go to "Directory Security" -Tab - (click).
click on Edit.
Enable "anounymous access". Click Ok.
Let me know if that worked for you.
Felipe
|
|
|
|
|
Thanks Felipe, but it still did not work. I am using IIS 5.1
Regards
The only permanent situation is change
|
|
|
|
|
Then try adding a Global.asax and/or Web.config.
If have those the last thing I can think of is:
Go the IIS, right click the virtual directory go to the ASP.NET Tab and select the Version 2.0.
Let me know how it goes.
Felipe
|
|
|
|
|
How to store and display data into xml file insted of sql or oracle DB from asp.net application
Thanks in Adv
|
|
|
|
|
Hi gopalakatla,
You can store & retrieve data to xml file using dataset object.
In the DataSet class, WriteXml() method which take file name as
argument is used to write data as xml data to the file. Through ReadXml()
method which take file name as argument is used to read or loaded xml data to DataSet object.
If you want operation similar to sql or oracle i.e using query, then you have
to write a separate utility class for doing query operation.
|
|
|
|
|
Hi,
I need to generate a report for top 10 share holders. its not that the first top 10 values. Its the top 10 share holders ( values). I am writing the query in sql server. Please help me to get top 10 share holder values.
Thank you.
Vasini
|
|
|
|
|
|
Combine order by clause and Top keyword.
Regards,
Arun Kumar.A
|
|
|
|
|
Is there a way to validate several fields on a form with ONE validation control?
The scenario - 10 fields, at least one of them needs an entry before proceeding to the next page.
I need to check if all fields are null (empty, blank) and return an error message
|
|
|
|