|
Is there any way to save the user's credentials to the database and re-use them?
I wanted to run all the threads and web-service calls as background processes using user's credentials.
I have tried to searilizing user's default credentials and it looks like that is not possible.
Is there any other options?
Please adivice,
Shrini Viswanathan
|
|
|
|
|
There is a way to pass the user credentials from a frontend application to a backend webservice. Even with the webservice using threads.
You only need to make sure that the webservice and the front-end work with the same credential store (Active directory) and that they use Security Impersonation. The front-end will impersonate the user that logs on to the application and use those credentials to access the webservice. If you enable impersonation on the service as well, you will have the same credentials there that can access resources.
You might want to lookup the documentation on the subject as I don't remember exactly which setting it was in web.config to enable the Security impersonation. Also you need to make sure that the web application(s) run as local system, otherwise impersonation doesn't work on windows 2003.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
hi all
I have been searching around but i havent found anything that JUST does what i need.
does anyone know a good link to a site that would show me how to connect to a sql DB and let me populate a dataset and then fill a datagridview
the database is currently read only so i don't need to worry about writing back to the db.
thanks in advance
Crash
|
|
|
|
|
Have you tried here[^]. There is a handy search function you can use.
only two letters away from being an asset
|
|
|
|
|
i start my timer than when timer is elapsed i want to change my sliderbars value in
private void timer1_elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
slider1.value=100; //i get error message in this line about threading and debug s broken.how can i solve it?
}
|
|
|
|
|
Hi,
you must be more specific:
- what kind of timer, there are at least three different Timer classes in CLR
- what Exception
My best guess is you are NOT using a Forms.Timer hence your timer is accessing
a Control from within a thread that did not create said Control, hence resulting
in an InvalidOperationException. If this suits your case, read up on
Control.InvokeRequired and Control.Invoke()
|
|
|
|
|
i get this message when i try to set sliderbar s value.System.InvalidOperationException.i used "using System.window.threading; "
i think i must break timer s threading than slider bar s valur could be changed.
|
|
|
|
|
So you have confirmed my assumption. You must:
either switch to a Forms.Timer
or call myControl.Invoke() instead of directly trying to change the Control
(read up on Invoke !).
|
|
|
|
|
please can you write code?i tried to write but i couldnt do it.
|
|
|
|
|
Hi,
I'm not going to do your work.
Did you try a Forms.Timer ? if not, why not ?
Did you read the MSDN documentation on your current timer ? and Forms.Timer ?
Did you try to call Invoke ? if so, show the code, and explain what happened.
If not, why not ? Did you at least search CodeProject for InvokeRequired/Invoke ?
and read an article about them ?
|
|
|
|
|
ok i have done it now.thanks all of so much good night
|
|
|
|
|
If your timer is running in a thread that doesn't own slider then you need to call Invoke methods. Have a look at this: http://msdn.microsoft.com/msdnmag/issues/04/02/TimersinNET/
|
|
|
|
|
i get this message when i try to set sliderbar s value.System.InvalidOperationException.i used "using System.window.threading; "
i think i must break timer s threading than slider bar s valur could be changed.
|
|
|
|
|
I am planning to develop an application using finger scanner so i want, which finger scanner is supported by c#, what is the SDK/library used for it and how to begin with it?
Abdus Sami
|
|
|
|
|
Why don't you use google? Just search for fingerprint sdk and you will definitely find one
|
|
|
|
|
Hi! There's some SDK's which you can use. If you want to start from easy SDK, I suggest you checking sourceforge project "Fingerprint Verification System":
FVS
I tried to search in Google and found some interesting links:
Google search
Hope this helps!
Timo Salomäki
|
|
|
|
|
I have created a picture viewer in C# but it's giving only one error, i don't know how to deal with it as i already faced lots of errors as i reduced it to one final error. I'm at beginner level in C#. So please help me in this, I have written the code and errors below, you can look at that.
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace WindowsApplication1<br />
{<br />
public partial class Myform : Form<br />
{<br />
private System.Windows.Forms.MenuItem menuFile;<br />
private System.Windows.Forms.MenuItem menuLoad;<br />
private System.Windows.Forms.MenuItem menuImage;<br />
private System.Windows.Forms.MenuItem menuExit;<br />
private System.Windows.Forms.MenuItem menuStretch;<br />
private System.Windows.Forms.MenuItem menuHelp;<br />
private System.Windows.Forms.MenuItem menuView;<br />
protected override void Dispose(bool dispose) { base.Dispose(dispose); }<br />
private PictureBox pboxPhoto;<br />
<br />
private void InitializeComponent()<br />
{<br />
this.menuFile = new System.Windows.Forms.MenuItem();<br />
this.menuLoad = new System.Windows.Forms.MenuItem();<br />
this.menuImage = new System.Windows.Forms.MenuItem();<br />
this.menuExit = new System.Windows.Forms.MenuItem();<br />
this.menuStretch = new System.Windows.Forms.MenuItem();<br />
this.menuExit = new System.Windows.Forms.MenuItem();<br />
this.menuView = new System.Windows.Forms.MenuItem();<br />
<br />
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuFile });<br />
this.menuFile.Index = 0;<br />
this.menuFile.Text = "&File";<br />
this.menuLoad.Index = 0;<br />
this.menuLoad.Shortcut = System.Windows.Forms.Shortcut.Ctrl;<br />
this.menuLoad.Text = "&Load";<br />
this.menuExit.Index = 1;<br />
this.menuExit.Text = "&Exit";<br />
<br />
menuView.Index = 1;<br />
menuView.Text = "&View";<br />
<br />
}<br />
<br />
public Myform()<br />
{<br />
this.Text = "Picture viewer";<br />
this.MinimumSize = new Size(200, 200);<br />
<br />
<br />
<br />
pboxPhoto = new PictureBox();<br />
pboxPhoto.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;<br />
pboxPhoto.Width = this.Width;<br />
pboxPhoto.Height = this.Height;<br />
pboxPhoto.Left = (this.Width - pboxPhoto.Width) / 2;<br />
pboxPhoto.Top = (this.Height - pboxPhoto.Height) / 2;<br />
pboxPhoto.SizeMode = PictureBoxSizeMode.StretchImage;<br />
pboxPhoto.Anchor = AnchorStyles.Top | AnchorStyles.Bottom<br />
| AnchorStyles.Left | AnchorStyles.Right;<br />
this.Controls.Add(pboxPhoto);<br />
<br />
<br />
}<br />
<br />
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
<br />
}<br />
<br />
protected void menuLoad_Click(object sender, System.EventArgs e)<br />
{<br />
menuLoad.Click += new System.EventHandler(this.menuLoad_Click);<br />
<br />
OpenFileDialog dlg = new OpenFileDialog();<br />
dlg.Title = "Open Photo";<br />
dlg.Filter = "jpg files (*.jpg)|*.jpg|All files (*.*)|*.*";<br />
if (dlg.ShowDialog() == DialogResult.OK)<br />
{<br />
try<br />
{<br />
pbxPhoto.Image = new Bitmap(dlg.OpenFile());<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show("Unable to load file: " + ex.Message);<br />
}<br />
<br />
dlg.Dispose();<br />
}<br />
}<br />
<br />
protected void menuExit_Click(object sender, System.EventArgs e)<br />
{<br />
this.Close();<br />
}<br />
private PictureBoxSizeMode[] modeMenuArray = null;<br />
}<br />
}<br />
This is the error message
Error Message:'WindowsApplication1.Form1.Dispose(bool)': no suitable method found to override.
Thanks a lot, i really need help in my project.
Mr.Dream_master
|
|
|
|
|
Hi,
the code you show contains a partial class, my best guess is in some other
part of that partial class (in another file, probably Form1.Designer.cs)
already is a definition of the Dispose(bool dispose) method.
So I suggest you try and remove the line
protected override void Dispose(bool dispose) { base.Dispose(dispose); }
from the code you have shown.
Anyway, look at the file name and line number Visual Studio shows when listing
the compiler errors.
|
|
|
|
|
well i tried the same you have told but it gave me warning plus same error. so i created this as override.
still not working having troubles.
Mr.Dream_master
|
|
|
|
|
WHAT warning ?
error on WHICH line ?
|
|
|
|
|
error i posted above already and warning i removed as its on dispose.
can you run that code on your machine brother and get it worked. I would be really thankfull to you brother.
|
|
|
|
|
Hi,
As I have told you before, the code you have shown is not all the code in your
project: there is a partial class showing, so some other part of same class MUST be
present somewhere; and there is no static Main() method in sight.
So no I cant run your code, it makes no sense to even try that.
I strongly suggest you be more meticulous, or choose another occupation.
|
|
|
|
|
Nope i can never choose another occupation as i thought you guys will help me out with my silly problem.
there is nothing in main except creating run.application as i created code in VS C# 2005. not in notepad or anywhere else.
Mr.Dream_master
|
|
|
|
|
This is the other file (form1.designer.cs)
<br />
namespace WindowsApplication1<br />
{<br />
partial class Form1<br />
{<br />
private System.ComponentModel.IContainer components = null;<br />
<br />
protected override void Dispose(bool disposing)<br />
{<br />
if (disposing && (components != null))<br />
{<br />
components.Dispose();<br />
}<br />
base.Dispose(disposing);<br />
}<br />
<br />
#region Windows Form Designer generated code<br />
<br />
private void InitializeComponent()<br />
{<br />
this.SuspendLayout();<br />
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);<br />
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;<br />
this.ClientSize = new System.Drawing.Size(292, 266);<br />
this.Name = "Form1";<br />
this.Text = "Form1";<br />
this.Load += new System.EventHandler(this.Form1_Load);<br />
this.ResumeLayout(false);<br />
<br />
}<br />
<br />
#endregion<br />
}<br />
}<br />
<br />
Thanks and waiting for reply
Mr.Dream_master
|
|
|
|
|
Hi,
very interesting.
Both this file and the one you showed in the original post contain a definition
for protected override void Dispose(bool dispose)
as I guessed already 14 hours ago. This cannot be correct. But it also would
cause a different error message, so something else is happening.
As Guffa pointed out your error message (if quoted correctly) does
not fit either file, we still have not seen a file called File1.cs
So my best guess right now is you have more than one project in your solution
and the error is not in the project you think it is; or maybe you made a real
mess renaming classes and/or files in order to confuse every one.
I will repeat once more: look carefully to the error message Visual produces,
normally it contains a file name and line number, and that's where it is wrong.
How hard can it be ?
|
|
|
|