|
That would be the easy way, we don't do the easy way here. Didn't you read the bi-laws!
Programmer: A biological machine designed to convert caffeine into code. * Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
Its easy, and can't be done in .NET. Rewrite the GINA. MS Provides a non-working C++ Gina Stub in the msdn.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
Hey,
I need to know the file name of the page im showing from within a master page. I'm currently using
Page.Page.Request.RawUrl.ToString();
and getting
/TangyMedia/default.aspx
I don't want the TangyMedia part as this only refers to the local Url. This will be just /default.aspx once online. How can I get just the second part?
Thanks
|
|
|
|
|
System.IO.Path.GetFileName should work.
|
|
|
|
|
How would that work in ASP.Net though.
This code is in the masterpages codebehind file. Therefore the Page object is the inner page that is loaded. So im using Page.Request
?
|
|
|
|
|
string pageUrl = Page.Page.Request.RawUrl.ToString();
string pageName = Path.GetFileName(pageUrl);
Does that work? From the way you described your problem, I believe it will.
|
|
|
|
|
Or he could wait for Ron Popiel[^] to invent a "Pocket String Chopper".
led mike
|
|
|
|
|
|
Is there a way to start the open file dialog control in thumbnail view. It is possible to switch to thumbnail view after the control starts up, but I can't see how to default it to start in thumbnail view.
Thanks for any help.
Brent
|
|
|
|
|
i want to make a login page in wich user will login and login name and passward will should match from database. if there is a new user and he is going to login first time than his user name and passward should we store in database
|
|
|
|
|
SqlConnection conn;
string myquerry;
SqlDataReader reader;
SqlCommand command;
string uname, pass,type;
try
{
conn = myclass.connect();
if (conn.State == ConnectionState.Open)
MessageBox.Show("Sql Connection is Already Avaliable", "Connection Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
catch
{
MessageBox.Show("There is an Error Occured While Connecting SQL Server", "Connection Error",MessageBoxButtons.OK,MessageBoxIcon.Stop);
}
myquerry = "Select * from users";
command = new SqlCommand(myquerry, conn);
reader = command.ExecuteReader();
while (reader.Read())
{
uname = reader.GetString(0).Trim();
pass = reader.GetString(1).Trim();
type = reader.GetString(2).Trim();
idno = reader.GetInt32(3);
if ((textBox1.Text == uname) && (pass == textBox2.Text))
{
r = true;
break;
}
}
reader.Close();
if (r == true)
{
if (type=="ADMIN")
{
Entrance.ActiveForm.Hide();
Admin a = new Admin();
a.Show();
}
else
{
}
}
else
MessageBox.Show("Wrong UserName Or Password", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|
|
|
|
//here is the sqlconnection code. use it myclass.connet()
string con_string = "workstation id=FIGHT_CLUB;packet size=4096;integrated security=SSPI;data source=FIGHT_CLUB;persist security info=False;initial catalog=proje";
SqlConnection mycon = new SqlConnection(con_string);
mycon.Open();
|
|
|
|
|
You store your passwords in clear text! Remind me never to your your site.
You also extract all the rows in the users table and iterate over them. That might be fine if you only have a couple of dozen users, but if the site is large this is extremely inefficient. I suggest adding some filters in the WHERE clause on the SQL statement.
|
|
|
|
|
Every webadmin use clear text! you should understand that how is your passwords are broken
but you r right, if use encoding it is best
|
|
|
|
|
|
Don't forget to encrypt the password in the database, just in case it gets cracked.
Programmer: A biological machine designed to convert caffeine into code. * Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
As the title says really, is this possible? If so how?
Basically I have an application that has been developed and compiled agaisnt .Net Framework 1.1 SP1. For various reasons this cannot currently be converted to a .NET 2 application however I need to use some functionality that only exists in .NET 2.
After a little testing I have found, unsurprisingly, that it isnt possible to add the reference so I came up with a cunning plan to make the .NET 2 assembly a COM object and then get the 1.1 application to call the COM interface. Unfortunatly this does work either as added the COM reference fails with a "CLR assembly cannot be converted to CLR assembly" error.
My next plan of attack is to allow runtime binding of the COM object and then using DllImport in the 1.1 application. I will not be surprised if this doesnt work either. If this doesnt work my last ditch solution is to create an unmanaged wrapper around the .Net 2 library and code the 1.1 application to call that instead. However this is a bit of a faff, so does anybody have any alternative suggestions?
|
|
|
|
|
It is not possible AFAIK, because .NET 2 assemblies may use generics or other functionality that is not available on CLR 1.x.
There are other problems with this too: IIRC, only 1 CLR version can be loaded per-process. Attempting to load CLR 2 under a .NET 1.x process will introduce more problems, I believe.
What functionality are you after? Perhaps the functionality you're after could be reproduced in 1.x code?
|
|
|
|
|
Judah Himango wrote: There are other problems with this too: IIRC, only 1 CLR version can be loaded per-process. Attempting to load CLR 2 under a .NET 1.x process will introduce more problems, I believe.
You are correct, which is why I attempted (unsecuccesfully) to use a COM bridge
Judah Himango wrote: What functionality are you after? Perhaps the functionality you're after could be reproduced in 1.x code?
The need to use the HTTP post classes that support client side SSL certification, unfortunatly this wasnt added in .NET 1.1 - Up to today I have been using C# Libcurl wrapper code, however this is prooving to be quite bloated and unreliable. In .NET 2 I can perfom the same functionality in 10 lines of code. In the past I have also used code provided by Org.Mentalis however this prooved to be highly unreliable hence the reason for shifting to the C# Libcurl wrapper:
http://www.mentalis.org/soft/projects/ssocket/[^]
http://sourceforge.net/projects/libcurl-net[^]
|
|
|
|
|
Would it be feasible to use Reflector to look at the .NET 2 assembly code, then recreate something similar in your .NET 1.x project?
|
|
|
|
|
Hi, I have a problem using WMI (framwork 1.1), I get all live nodes scanned using the WMI Provider's ping service. But when I go to query those machines for any other information such as hardware (harddrive's info) I get an error "RPC Server unavilable".
I am logged in as Domain Administrator.
If any1 can guide me through this please.
Thank you!
Nauman Yousuf
|
|
|
|
|
The Ping server just bounces an ICMP packet off the remote machines network stack. It does NOT make sure the WMI service is reachable on the remote machine. The reason you're getting that error message is because the WMI services are not running, or are not installed, on those machines. Another possibility is that those machines are sitting behind a firewall that is filtering out the Remote Procedure Calls that are being made.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thank you! for your reply and It was useful.
I just have one more open issue i.e. I am unable to scan Machines outside of my Hub / Switch, I made sure that all machines have WMI Service running and they are on the same domain as mine (my machine is logged in as admin)
Thank you!
"Mess with the Best, Die like the rest"
|
|
|
|
|
Are the machines pingable by name AND IP? If they're pingable by IP, but not by name, then there ius a name resolution problem (DNS).
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi, i used ShockWaveFlash in my windows application.
i want to disable default ContextMenu for shockWaveFlash when my form runs.
how i can do it ?
thanks
|
|
|
|