|
I am trying to implement security in Asp.net. I designed three pages login.aspx, WebForm1.aspx and WebForm2.aspx.. Every user should first login before accessing WebForm1.aspx and WebForm2.aspx. But my security fails when any user save the address of WebForm1.aspx and directly access it. In other word he may bypass login page. Can anyone solve this problem? thanx
|
|
|
|
|
hi there,
u should post this in asp.net/web deveplopment thread for getting expert's answers
BTW, u can implement the security by checking session. if users access directly webform1.aspx, in this page u must check the info in session whether it's valid or not
hope this helps
<< >>
|
|
|
|
|
Greeting ,
How can I use a class that written with another compatible .NET language in C#?
How can I write a project that consist of some .NET languages?
|
|
|
|
|
You can add that class as a separate library project in your solution and reference it wherever you need.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Best option is often to just reference the other assembly as the other poster mentioned. Another option is to convert it (very subtle plug).
David Anton
Tangible Software Solutions
www.tangiblesoftwaresolutions.com
Home of:
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant J#: VB.NET to J# Converter
|
|
|
|
|
can i read the contents of an edit box on a different form, from a diff application?
IM PROUD TO BE A GMAIL;
|
|
|
|
|
I'm not sure, but I don't think you can...
Darth_Sulfur (Sulfurik)
http://www.SulfurSoft.tk
ftp://tsfc.ath.cx
http://tsfc.ath.cx
hotline://tsfc.ath.cx
|
|
|
|
|
If you have the window handle, yes, you can. You can use the SendMessage to query the text length first using WM_GETTEXTLENGTH (IIRC) and then query the actual contents using WM_GETTEXT.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
but can you do this in c#?
IM PROUD TO BE A GMAIL;
|
|
|
|
|
Hi
i am working on project about painting . i want to fill a closed area but don't know how can read color of pixel in form .
i don't want to use fillregion or fillpath methods because i don't know which path or region must passed as parameter .
Can anyOne Help me?
Regards Amir Jalaly
|
|
|
|
|
i made a service that do nothing actually , i tried to run
installutil.exe service.exe but the following error :
Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name Documents, or one of its
dependencies, was not found..
can anyone help?
amir
|
|
|
|
|
Not without seeing your code where the error occurs.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok here is the code
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Configuration.Install;
namespace first_service
{
///
/// This is the class for my Service
///
public class MyService : System.ServiceProcess.ServiceBase
{
public MyService()
{
InitializeComponents();
// TODO: Add any further initialization code
this.CanStop = true;
this.CanPauseAndContinue = true;
}
private void InitializeComponents()
{
this.ServiceName = "MyService";
}
///
/// This method starts the service.
///
public static void Main()
{
System.ServiceProcess.ServiceBase.Run(new System.ServiceProcess.ServiceBase[] {
new MyService() // To run more than one service you have to add them here
});
}
///
/// Clean up any resources being used.
///
protected override void Dispose(bool disposing)
{
// TODO: Add cleanup code here (if required)
base.Dispose(disposing);
}
///
/// Start this service.
///
protected override void OnStart(string[] args)
{
// TODO: Add start code here (if required)
// to start your service.
}
///
/// Stop this service.
///
protected override void OnStop()
{
// TODO: Add tear-down code here (if required)
// to stop your service.
}
}
}
[RunInstaller(true)]
public class ProjectInstaller : Installer
{
public ProjectInstaller()
{
ServiceProcessInstaller spi = new ServiceProcessInstaller();
spi.Account = ServiceAccount.LocalSystem;
spi.Password = "toto";
spi.Username = "mesh";
ServiceInstaller si = new ServiceInstaller();
si.ServiceName = "Hello Service Template";
si.StartType = ServiceStartMode.Automatic;
Installers.AddRange(new Installer[] {spi, si});
}
}
|
|
|
|
|
how can i create an interactive service??? i know that the attribute SERVICE_INTERACTIVE_PROCESS will be used but how?
amir
|
|
|
|
|
Hello All,
I need to add a check box colume in the data grid and coded this code but the check box dosnt appear at all.
Please help.
private void Form1_Load(object sender, System.EventArgs e)<br />
{<br />
DataGridTableStyle ts1 = new DataGridTableStyle();<br />
ts1.MappingName = "Customers";<br />
<br />
DataGridBoolColumn myDataCol = new DataGridBoolColumn();<br />
myDataCol.HeaderText = "My New Column";<br />
myDataCol.MappingName = "Current";<br />
<br />
ts1.GridColumnStyles.Add(myDataCol);<br />
<br />
<br />
dataGrid1.TableStyles.Clear();<br />
dataGrid1.TableStyles.Add(ts1);<br />
<br />
dataSet11.Tables[0].Columns.Add("Current");<br />
dataGrid1.DataSource = dataSet11.Tables[0];<br />
<br />
<br />
<br />
<br />
}
this code in the winforms
Regards,
Hay
|
|
|
|
|
I'm in need of creating 200 bool random value (0 & 1). I'm coding like this :
Random rand = new Random()
rand.Next(0,2)
If i run in debug mode, the values it create is really random but if i don't debug, let it run automatic, all the values is just 0 or 1. Can someone tell me why and give me the direction to solve it?
Thanks!
|
|
|
|
|
If you look closely at the documentation for the Random class, you will see that it doesn't work when calls to Next are made in quick succession. That explains your debug vs non-debug behavior.
Instead of generating a random number between 0 and 2, wouldn't it be better if you generated random numbers (0 to size of int) and then converted them to binary? You can generate as many random numbers as you want until you get 200 binary digits.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks! Your direction really works!
|
|
|
|
|
I have a decimal value 23.25 . When i use the math.round(23.25,1) in VS.NET, the result is 23.2 but with the function: round(23.25,1) in SQL Server 2000, the result is 23.3
How can i let them return the same value ?
Thanks!
|
|
|
|
|
See reply in the other forum you posted to (SQL/ADO/ADO.NET).
BTW posting the same question to multiple forms is considered to be rude, and will in some cases result in your question being ignored in all places.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.
Eric Hoffer
|
|
|
|
|
I'm really sorry, Graham! I didn't mean it. Because i don't know which forum the question is suit to ... Besides, i used to face a similar situation. I used to posted a question in C# general but no-one answer me because posting it in SQL is more exactly ... So ... I'm really sorry. I will never repeat it again.
By the way, thanks your reply!
|
|
|
|
|
I host a object in a window service, and call it remotely from a particular client. I set the object as a Singleton mode in which it should return the same instance everytimes i remotely call. However, it happens to me that at some point, it will create a new instance of the object ???!!!!
What went wrong ?!!
|
|
|
|
|
Maybe the singleton's lease expired and the remoting framework created a new one?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
hi,
i have two listview controls , i want columnheader width change in one of the control should be similaraly affected in the other control at run time......
waiting 4 reply
zeshan
|
|
|
|
|
Well, just set the width of the columnheader of the second control to that of the first control. Hope that helps.
Darth_Sulfur (Sulfurik)
http://www.SulfurSoft.tk
ftp://tsfc.ath.cx
http://tsfc.ath.cx
hotline://tsfc.ath.cx
|
|
|
|