|
If you have a web based application, how can they access it without a network connection?
|
|
|
|
|
They cannot, that's where the lite desktop app comes in.
|
|
|
|
|
Without a lite AD, they've got nothing to query, and hence, nothing to authenticate against. Either drop the requirement for disconnected authentication (have 'em authenticate when they're back at work, uploading the new data on the network), or provide a way to authenticate them over the internet.
Keep in mind that I'm sniffing things on my own network, so you might want to encrypt that data if your user is going over somebody else's network
Third option would be a dedicated dial-in. POTS!
Bastard Programmer from Hell
|
|
|
|
|
|
The normal way to do this is to write to a local database, and then use something like Microsoft's Sync Framework[^] to upload the changes when they are connected back into the network.
|
|
|
|
|
I had a feeling someone was going suggest that I left that out of my original question on purpose because I didn't want to have to sync more than what's needed. That's probably what I'll end up doing. Thanks for your input!
|
|
|
|
|
No problem. Without a network connection, whether or not you can verify the user is totally unimportant, you have to store the data somewhere, and that can only be local. I'm not sure what other architecture you thought would be possible, but if you want the changes reflected in the server, then you have to sync the data at some point.
|
|
|
|
|
I want to send a key(TAB) to the window of certmgr.msc.
I have tried using the sendkeys command with no prevail and i have tried sending/posting a message to a handle of the window with no luck.
My suspicion is that there are certain security measures in place to stop programatical input on this window.
Any ideas?
Thanks in advance!
|
|
|
|
|
MitchG92_24 wrote: Any ideas?
Yes, stop using SendKeys, and use programmatic access to the store. What are you trying to achieve? List, import or export certificate?
Bastard Programmer from Hell
|
|
|
|
|
Well we are automating the configuration of a Windows 8 machine, but we need to keep it as close to how it would be acheived through keyboard and mouse.
I need enroll a new certificate and flick some settings here and there within certmgr. Was just seeing if there was a possible way to do it through keypresses, if not then i will look into other methods like the one you have offered
|
|
|
|
|
MitchG92_24 wrote: but we need to keep it as close to how it would be acheived through keyboard
and mouse.
Why? What value does that add? The only thing I can see that's added is the risk of someone messing up the entire script by pressing a key on the keyboard - or worse, moving the mouse by pushing the table.
MitchG92_24 wrote: Was just seeing if there was a possible way to do it through keypresses, if not
then i will look into other methods like the one you have offered
In that case, try AutoHotKey[^] to verify if it can be done by sending keystrokes.
Bastard Programmer from Hell
|
|
|
|
|
Hi,
I have an exception in my application
if I click the button Mysql the combobox loaded with mysql databases names and I select name of the database
if I click the button Sql server the combobox loaded with sql server databases names and I select name of the database
when I click on the button mysql the connection is done and when I change the click on the button sql server, i have an exception
this is the code:
private void btnMySQL_Click(object sender, RoutedEventArgs e)
{
mode = 1;
combdb.ItemsSource = ConnexionMysql.GetDataBasesNames();
}
private void btnSQLserver_Click(object sender, RoutedEventArgs e)
{
mode = 2;
combdb.ItemsSource = ConnexionSqlServer.GetDataBasesNames();
}
private void combdb_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
switch (mode)
{
case 1:
{
datasource = combdb.SelectedItem.ToString();
if (ConnexionMysql.getConnexion(datasource))
{
traitement......
}
else
{
MessageBox.Show("erreur");
}
}
break;
case 2:
{
datasource = combdb.SelectedItem.ToString();
if (ConnexionSqlServer.getConnexion(datasource))
{
.................
}
else
{
MessageBox.Show("erreur");
}
}
break;
}
}
|
|
|
|
|
Did you create a MySql-connection? ConnexionMysql would be empty according to the message.
Bastard Programmer from Hell
|
|
|
|
|
yes i created mysql connexion in a class
//if (ConnexionMysql.getConnexion(datasource))
|
|
|
|
|
Not in the ConnexionMysql class, I hope? The ConnexionMysql object needs to exist (new ConnexionMysql) before you call any non-static methods.
I suggest you create the connection when it's needed, using the standard pattern; create a IDbConnection, create an IDbCommand, open, execute.
Bastard Programmer from Hell
|
|
|
|
|
the connexionmysql is a static class witch contain the connection with database with the method"getconnexion" and function "getdatabasenames"
|
|
|
|
|
Can you post the code of that method? That's where the error will be originating from
Bastard Programmer from Hell
|
|
|
|
|
He should be debugging it, not posting it. It's not a difficult thing for him to do.
|
|
|
|
|
I don't see anything difficuly in creating a connection, but apparently, it is. I could say that he should be reading the documentation, but most people don't
Bastard Programmer from Hell
|
|
|
|
|
I stick a breakpoint on the line that's raising the exception, and i get combobox item=null
|
|
|
|
|
Stick a breakpoint on the line that's raising the exception. Run the application, and follow the steps necessary to get to that point. When the debugger breaks on that line, hover the mouse over ConnectionMysql and see if it's null or not. If it's not null, step into getConnexion and step through that code.
This is debugging 101. How come you haven't tried this yourself?
|
|
|
|
|
|
And there's your problem. If this is null, don't attempt to execute the code.
|
|
|
|
|
i Stick a breakpoint on the line
combdb.ItemsSource = ConnexionSqlServer.GetDataBasesNames() wich is the method that fill the combobox, i get the exception on combobox although the method returns the names of the database
when I test every single button while it works but the problem is when I migrate from one button to another
|
|
|
|
|
When the selection in a ComboBox changes, you get TWO (2) SelectionChanged events:
- the originally selected item gets unselected, and nothing is selected
- the new item gets selected
Therefore always check that combdb.SelectedItem is not nothing before you use it!
|
|
|
|