| .NET Windows authentication |
|
 |
Index ‹ DotNet ‹ Winforms
|
- Previous
- 1
- Dotnet >> .NET COM import to VB4Hi!
I have created a simple COM class in VC# (ie "Hello World" through
Windows.Forms.MessageBox). When I try to use it in VB4 I get an error
saying that the server CLSID {GUID...} can not be loaded. Is it at all
possible to use .NET COM classes in VB4?
Best regards
Michal Ziemski
- 2
- Net Framework >> huge TMP files (windows\temp)Hi,
I did create .net application that is using .net remoting. When I start the
application temp (.tmp) files are created into the "windows\temp" folder.
When I close the application the tmp files are deleted. I'm not sure of all
files are deleted properly because sometimes files are still there. When I
kill the application by the task manager the tmp files are not deleted
anymore. I discover also some generated assembly files in the temp folder.
[assembly:System.Security.AllowPartiallyTrustedCallers()]
namespace Microsoft.Xml.Serialization.GeneratedAssembly {
public class XmlSerializationWriter1 :
System.Xml.Serialization.XmlSerializationWriter {
On many computers I don't have this problem. There are also computers where
this problem occurs.
Thanks,
Bart Plasmeijer
- 3
- Winforms >> Threading, InvokeRequiredI have an exception handling procedure which displays an error message
to the user. This is done by creating an instance of the custom form
ErrorDisplay and showing that instance as a modal dialog, parented to
the main MDI window. The code is as follows.
Private Shared Sub DisplayExceptionMessage(ByVal ToDisplay As String)
Dim frmError As New ErrorDisplay(ToDisplay)
frmError.StartPosition = FormStartPosition.CenterScreen
If frmError.ShowDialog(MdiParent) = DialogResult.No Then
Application.Exit()
End If
End Sub
This procedure normally runs on the main thread, however I have
recently introduced multithreading to the application and am now
finding that it will sometimes run on one of the worker threads I have
created.
The problem comes when showing the error form as its behaviour is not
exactly the same as when the procedure runs from the main thread. I
believe this is because the MdiParent variable, which is a reference to
the app's MDI window, was created on the main thread and frmError on
the worker thread. I probably need to use the Control.Invoke method
here but can't quite see how. This theory is backed up by the fact that
MdiParent.InvokeRequired returns true when running on the worker
thread.
Any suggestions would be gratefully received.
Thanks,
Ross
- 4
- Winforms >> Hard disk running out of spaceI have two hard disk c: 6 gig and d: 40 gig. My windows XP was installed in
c: drive. I got less than 200mb left in c:. Thinking of transfering win XP os
into d:. How can I do that? Pls help. Thank you.
- 5
- Visual C#.Net >> Exception Handling QHi All, my errMsg string never gets initialized when there is an exception.
Can someone explain me why?
Thanks
string errMsg=null;
try
{
MyFunction();
}
catch(Exception e)
{
throw new Exception("Failed in MyFunction",e.InnerException);
errMsg="Some error:
}
return errMsg;
- 6
- Microsoft Project >> Average percent workI'd like to have a column where i display the AVERAGE percent work per
resource. is there a way to do this.
I want it to take the work and divide it by the length. for example, if i
have 20 hours per week on a project, have it display 50% in a resource usage
view. I can even do it manually and just take the column "work" and divide it
by the duration...
This is my third time posting the question, but its not showing up...
- 7
- Net Framework >> Re: Treeview and ListviewAlbert,
I have a question: why is your timer not working when your form doesn't
have focus? In my opinion, it should keep working fine. Are you getting
some sort of exception? Can you shed some more light on your
implementation? Perhaps you could post some sample code. Are you
building a MMC plugin, or is this a pure C# WinForms application?
- 8
- 9
- 10
- Net Framework >> Issues with .NETHi
I understand that there is nothing like disabled image list in toolbar of
VB.NET
Also, there is no placeholder button on it.
Why have these features been removed. Any plans of MS to incorporate them in
future versions of .NET?
Regards.
- 11
- Visual C#.Net >> changing the defualt languagehello,
i'm wiriting in in C# and my windows is locolized meaning my default
language is not english, but i want that is some textboxes my language will
be english. is it better way to do it then chaging each char to it's english
char on the keyboard (meaning better then catching the event of the
KeyPress/Down/Up check which char is it and replace it)?
thanks
- 12
- Microsoft Project >> TimeSheet utility for ProjectServer 2003Hi All,
we published a solution demonstrating new PDS capabilities and
providing timesheet functionality.
It downloads your tasklist to System Tray and tracks time you spend on
each task.
At the end of the day it submits timesheet automaticaly.
FREE version located at: http://www.pmprofy.ru/rtt/
Hope you'll find it useful!
With best regards,
Vadim Bogdanov
- 13
- Net Framework >> the brotherhoodYes... it is fight for democracy...just fool yourself.....:
http://www.jameswickstrom.com/iraq/photos_show_rape_of_iraqi_women.htm
PS: I can't ignore the brotherhood you american show to the world.....
Shame on you all.
- 14
- 15
- Net Framework >> EndInvoke still required?I've read a lot of comments from the 1.1 framework era about a page of the
documentation that claims you have to always call EndInvoke on an
IAsynchResult.
Various comments I've read suggest that this wasn't strictly required in
the current implementation (1.0 and probably 1.1) but that the runtime team
reserved the right to leak if you didn't call EndInvoke.
I've been looking through the 2.0, 3.0, and 3.5 documentation and can no
longer find this reference. The Asynchronous Programming Overview page no
longer says anything about this being a requirement, and the BeginInvoke
method doesn't mention anything about it.
Is EndInvoke still a requirement? I've read elsewhere that the the
framework team has guarnateed that BeginInvoke won't leak, so it's a bit
confusing.
|
| Author |
Message |
JimMathewson

|
Posted: Wed Oct 08 20:17:04 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
I have a vb.net application that connects to Web Service
pages *.asmx running on a local instance of IIS. These
webservices connect to a SQL server on another machine.
The web services are set to impersonate user, and Windows
authentication. All is well.
Next, I moved the webservices to another server running
IIS, which happens to be the SAME machine as SQL server
that these services connect to. My app can connect to the
Web service pages, but the web service fails to propgate
the CLIENT user/login credentials to the SQL server, and
it uses the NT AUTHORITY\Anonymous account for some reason.
I can't figure it out, but I've heard mention of similar
issues being solved with modifications to
Machine.config... any ideas?
The point of this is that I want to use the SQL SUSER_SNAME
() functions to restrict/change the views in SQL, so that
function needs to return the username of the authenticated
client.
DotNet365
|
| |
|
| |
 |
Chris

|
Posted: Wed Oct 08 20:17:04 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
If you did not change anything in the Web Services connection string for the
database, nor in the Web.config file, then it may be that you forgot to turn
off Anonymous access for the virtual directory on the new server. To test
the user connecting to the Web Service, add a function GetConnectingUser or
something to it, and return
System.Security.Principal.WindowsIdentity.GetCurrent().Name
Just call it with IE and check what it returns.
"Bryan" <EMail@HideDomain.com> wrote in message
news:05ee01c38ddc$868e7370$EMail@HideDomain.com...
> I have a vb.net application that connects to Web Service
> pages *.asmx running on a local instance of IIS. These
> webservices connect to a SQL server on another machine.
> The web services are set to impersonate user, and Windows
> authentication. All is well.
>
> Next, I moved the webservices to another server running
> IIS, which happens to be the SAME machine as SQL server
> that these services connect to. My app can connect to the
> Web service pages, but the web service fails to propgate
> the CLIENT user/login credentials to the SQL server, and
> it uses the NT AUTHORITY\Anonymous account for some reason.
>
> I can't figure it out, but I've heard mention of similar
> issues being solved with modifications to
> Machine.config... any ideas?
>
> The point of this is that I want to use the SQL SUSER_SNAME
> () functions to restrict/change the views in SQL, so that
> function needs to return the username of the authenticated
> client.
|
| |
|
| |
 |
v-kevy

|
Posted: Thu Oct 09 03:47:33 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Hi Bryan,
This issue might be caused by anonymous acess in IIS. Try to turn off
anonymous access in IIS to see if it works. When your webservice connects
to a SQL server, it uses the impersonated account to create a connection.
If the anonymous access is turned on, the account is impersonated as IUSER
on the machine. IUSER might don't have the privilege to connect to the SQL
server. So the connection failed.
To turn off anonymous access, right click you webservice in IIS and choose
properties in popup menu. Choose Directory Security tab, and click Edit
button. Uncheck Anonymous Access and click OK.
If anything is unclear, please feel free to reply to the post.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
--------------------
| Content-Class: urn:content-classes:message
| From: "Bryan" <EMail@HideDomain.com>
| Sender: "Bryan" <EMail@HideDomain.com>
| Subject: .NET Windows authentication
| Date: Wed, 8 Oct 2003 13:41:18 -0700
| Lines: 21
| Message-ID: <05ee01c38ddc$868e7370$EMail@HideDomain.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcON3IaOF0znyWCvR+S8mtdjfOg/2Q==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:54006
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| I have a vb.net application that connects to Web Service
| pages *.asmx running on a local instance of IIS. These
| webservices connect to a SQL server on another machine.
| The web services are set to impersonate user, and Windows
| authentication. All is well.
|
| Next, I moved the webservices to another server running
| IIS, which happens to be the SAME machine as SQL server
| that these services connect to. My app can connect to the
| Web service pages, but the web service fails to propgate
| the CLIENT user/login credentials to the SQL server, and
| it uses the NT AUTHORITY\Anonymous account for some reason.
|
| I can't figure it out, but I've heard mention of similar
| issues being solved with modifications to
| Machine.config... any ideas?
|
| The point of this is that I want to use the SQL SUSER_SNAME
| () functions to restrict/change the views in SQL, so that
| function needs to return the username of the authenticated
| client.
|
|
| |
|
| |
 |
Bryan

|
Posted: Thu Oct 09 07:41:05 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Gentlemen,
IIS anonymous is turned off (I should have mentioned
that); only windows integrated security is turned on, and
Integrated Security is specified in the connection string.
Upon further investigation (SQL Trace) I found that the
proper login credentials ARE passed to SQL because the
first two procedures run properly on SQL.
When my application starts, it displays a splash screen
while connecting/initializing. It runs the two startup
procedures, writes an event log entry (with data from the
procedures), then I get an "Application has generated an
exception that can not be handled" dialog box with a
thread and process ID, forcing a quit.
The above code is in a Sub Main(). Sub Main ends with the
following line, which may be the culprit:
Application.Run(pxMainForm)
Where pxMainForm is the primary MDI form.
I'm new to the whole code access security stuff, so I
tested giving all code Full Access, but that didn't work
either.
Thanks for your help,
Bryan
|
| |
|
| |
 |
v-kevy

|
Posted: Fri Oct 10 03:23:49 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Hi Bryan,
I'm currently researching on this issue and will update you as soon as I
get any progress.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
--------------------
| Content-Class: urn:content-classes:message
| From: "Bryan" <EMail@HideDomain.com>
| Sender: "Bryan" <EMail@HideDomain.com>
| References: <05ee01c38ddc$868e7370$EMail@HideDomain.com>
<EMail@HideDomain.com>
| Subject: RE: .NET Windows authentication
| Date: Thu, 9 Oct 2003 05:41:05 -0700
| Lines: 31
| Message-ID: <0b9101c38e62$9b4119e0$EMail@HideDomain.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOOYptBIE2iehfIRSKSU18HQokBIQ==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:54052
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Gentlemen,
| IIS anonymous is turned off (I should have mentioned
| that); only windows integrated security is turned on, and
| Integrated Security is specified in the connection string.
|
| Upon further investigation (SQL Trace) I found that the
| proper login credentials ARE passed to SQL because the
| first two procedures run properly on SQL.
|
| When my application starts, it displays a splash screen
| while connecting/initializing. It runs the two startup
| procedures, writes an event log entry (with data from the
| procedures), then I get an "Application has generated an
| exception that can not be handled" dialog box with a
| thread and process ID, forcing a quit.
|
| The above code is in a Sub Main(). Sub Main ends with the
| following line, which may be the culprit:
|
| Application.Run(pxMainForm)
|
| Where pxMainForm is the primary MDI form.
|
| I'm new to the whole code access security stuff, so I
| tested giving all code Full Access, but that didn't work
| either.
|
| Thanks for your help,
| Bryan
|
|
|
|
| |
|
| |
 |
scotr

|
Posted: Fri Oct 10 07:47:22 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Are you getting any authentication errors? Do you have the same Web.config file? Did you check Chris's suggestion of making sure you have Annon Access turned of on the
virtual directory?
Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : EMail@HideDomain.com <Remove word online. from address>
This posting is provided ?AS IS?, with no warranties, and confers no rights.
Get Secure!
http://www.microsoft.com/security
http://www.microsoft.com/protect
--------------------
>Content-Class: urn:content-classes:message
>From: "Bryan" <EMail@HideDomain.com>
>Sender: "Bryan" <EMail@HideDomain.com>
>Subject: .NET Windows authentication
>Date: Wed, 8 Oct 2003 13:41:18 -0700
>Lines: 21
>Message-ID: <05ee01c38ddc$868e7370$EMail@HideDomain.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcON3IaOF0znyWCvR+S8mtdjfOg/2Q==
>Newsgroups: microsoft.public.dotnet.framework.windowsforms
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.windowsforms:54006
>NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
>X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
>
>I have a vb.net application that connects to Web Service
>pages *.asmx running on a local instance of IIS. These
>webservices connect to a SQL server on another machine.
>The web services are set to impersonate user, and Windows
>authentication. All is well.
>
>Next, I moved the webservices to another server running
>IIS, which happens to be the SAME machine as SQL server
>that these services connect to. My app can connect to the
>Web service pages, but the web service fails to propgate
>the CLIENT user/login credentials to the SQL server, and
>it uses the NT AUTHORITY\Anonymous account for some reason.
>
>I can't figure it out, but I've heard mention of similar
>issues being solved with modifications to
>Machine.config... any ideas?
>
>The point of this is that I want to use the SQL SUSER_SNAME
>() functions to restrict/change the views in SQL, so that
>function needs to return the username of the authenticated
>client.
>
|
| |
|
| |
 |
Bryan

|
Posted: Fri Oct 10 10:58:26 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Scot,
My reply under Kevin's has more info, including the turned
off virtual directory.
No authentication errors are logged. Again, it does
connect to SQL with the login, but then throws an
exception.
I copied the bin directory from the development machine to
the target server. Then, I updated the "client" app.config
file to point to the new URL of it's web reference, which,
by getting data from SQL, appears to be working.. for two
DB calls, that is.
>Are you getting any authentication errors? Do you have
the same Web.config file? Did you check Chris's suggestion
of making sure you have Annon Access turned of on the
>virtual directory?
|
| |
|
| |
 |
Bryan

|
Posted: Fri Oct 10 12:03:23 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Well, you're not going to belive this, but I found it to
be a missing reference to a shared library...
I have the following line
AddHandler AppDomain.CurrentDomain.UnhandledException,
AddressOf MyUnhandledException
at the beginning of sub Main() but it failed to trap the
exception. I found this "global error handler" on msdn
and it seems to work in most cases, but not all.
|
| |
|
| |
 |
Michael

|
Posted: Fri Oct 10 12:25:42 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
"Bryan" <EMail@HideDomain.com> wrote in news:017801c38f50$69dc3260
$EMail@HideDomain.com:
> Well, you're not going to belive this, but I found it to
> be a missing reference to a shared library...
>
> I have the following line
>
> AddHandler AppDomain.CurrentDomain.UnhandledException,
> AddressOf MyUnhandledException
>
> at the beginning of sub Main() but it failed to trap the
> exception. I found this "global error handler" on msdn
> and it seems to work in most cases, but not all.
My experience with this handler is that you can't stop the application from
crashing, but you can perform additional handling, such as reporting the
error to a log server or similar feedback. If you don't do anything in the
handler (such as MessageBox.Show(...)) then you may not realize that the
handler has indeed fired.
-mbray
|
| |
|
| |
 |
v-kevy

|
Posted: Mon Oct 13 03:04:49 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Hi Bryan,
I'm glad to hear that you've found a problem. Is this the reason why no
authentication errors are logged or cannot log on to SQL server? If you
still cannot get it work, please give me some logged error message, I'll be
glad to help.
If anything is unclear, please feel free to reply to the post.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
--------------------
| Content-Class: urn:content-classes:message
| From: "Bryan" <EMail@HideDomain.com>
| Sender: "Bryan" <EMail@HideDomain.com>
| References: <05ee01c38ddc$868e7370$EMail@HideDomain.com>
<EMail@HideDomain.com>
<0b9101c38e62$9b4119e0$EMail@HideDomain.com>
<EMail@HideDomain.com>
| Subject: RE: .NET Windows authentication
| Date: Fri, 10 Oct 2003 10:03:23 -0700
| Lines: 11
| Message-ID: <017801c38f50$69dc3260$EMail@HideDomain.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOPUGncFa0M6Y/0Rqewlf2mVew6Dw==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:54174
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Well, you're not going to belive this, but I found it to
| be a missing reference to a shared library...
|
| I have the following line
|
| AddHandler AppDomain.CurrentDomain.UnhandledException,
| AddressOf MyUnhandledException
|
| at the beginning of sub Main() but it failed to trap the
| exception. I found this "global error handler" on msdn
| and it seems to work in most cases, but not all.
|
|
| |
|
| |
 |
v-kevy

|
Posted: Fri Oct 17 01:39:40 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Hi Bryan,
I'd like to know if this issue has been resolve. Is there anything that I
can help? I'm still monitoring on this issue.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
--------------------
| Content-Class: urn:content-classes:message
| From: "Bryan" <EMail@HideDomain.com>
| Sender: "Bryan" <EMail@HideDomain.com>
| Subject: .NET Windows authentication
| Date: Wed, 8 Oct 2003 13:41:18 -0700
| Lines: 21
| Message-ID: <05ee01c38ddc$868e7370$EMail@HideDomain.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcON3IaOF0znyWCvR+S8mtdjfOg/2Q==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:54006
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| I have a vb.net application that connects to Web Service
| pages *.asmx running on a local instance of IIS. These
| webservices connect to a SQL server on another machine.
| The web services are set to impersonate user, and Windows
| authentication. All is well.
|
| Next, I moved the webservices to another server running
| IIS, which happens to be the SAME machine as SQL server
| that these services connect to. My app can connect to the
| Web service pages, but the web service fails to propgate
| the CLIENT user/login credentials to the SQL server, and
| it uses the NT AUTHORITY\Anonymous account for some reason.
|
| I can't figure it out, but I've heard mention of similar
| issues being solved with modifications to
| Machine.config... any ideas?
|
| The point of this is that I want to use the SQL SUSER_SNAME
| () functions to restrict/change the views in SQL, so that
| function needs to return the username of the authenticated
| client.
|
|
| |
|
| |
 |
Bryan

|
Posted: Fri Oct 17 07:45:06 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Kevin, it's closed... Thanks for your help.
Regards,
Bryan C. Weis
>-----Original Message-----
>Hi Bryan,
>
>I'd like to know if this issue has been resolve. Is there
anything that I
>can help? I'm still monitoring on this issue.
>
>Kevin Yu
>=======
>"This posting is provided "AS IS" with no warranties, and
confers no
>rights."
>
>--------------------
>| Content-Class: urn:content-classes:message
>| From: "Bryan" <EMail@HideDomain.com>
>| Sender: "Bryan" <EMail@HideDomain.com>
>| Subject: .NET Windows authentication
>| Date: Wed, 8 Oct 2003 13:41:18 -0700
>| Lines: 21
>| Message-ID: <05ee01c38ddc$868e7370$EMail@HideDomain.com>
>| MIME-Version: 1.0
>| Content-Type: text/plain;
>| charset="iso-8859-1"
>| Content-Transfer-Encoding: 7bit
>| X-Newsreader: Microsoft CDO for Windows 2000
>| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>| Thread-Index: AcON3IaOF0znyWCvR+S8mtdjfOg/2Q==
>| Newsgroups:
microsoft.public.dotnet.framework.windowsforms
>| Path: cpmsftngxa06.phx.gbl
>| Xref: cpmsftngxa06.phx.gbl
>microsoft.public.dotnet.framework.windowsforms:54006
>| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
>| X-Tomcat-NG:
microsoft.public.dotnet.framework.windowsforms
>|
>| I have a vb.net application that connects to Web
Service
>| pages *.asmx running on a local instance of IIS. These
>| webservices connect to a SQL server on another machine.
>| The web services are set to impersonate user, and
Windows
>| authentication. All is well.
>|
>| Next, I moved the webservices to another server running
>| IIS, which happens to be the SAME machine as SQL server
>| that these services connect to. My app can connect to
the
>| Web service pages, but the web service fails to
propgate
>| the CLIENT user/login credentials to the SQL server,
and
>| it uses the NT AUTHORITY\Anonymous account for some
reason.
>|
>| I can't figure it out, but I've heard mention of
similar
>| issues being solved with modifications to
>| Machine.config... any ideas?
>|
>| The point of this is that I want to use the SQL
SUSER_SNAME
>| () functions to restrict/change the views in SQL, so
that
>| function needs to return the username of the
authenticated
>| client.
>|
>
>.
>
|
| |
|
| |
 |
v-kevy

|
Posted: Fri Oct 17 19:59:14 CDT 2003 |
Top |
Winforms >> .NET Windows authentication
Hi Bryan,
I'm glad to hear that you have resolve the problem. Thank you for choosing
MSDN Newsgroup.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
--------------------
| Content-Class: urn:content-classes:message
| From: "Bryan" <EMail@HideDomain.com>
| Sender: "Bryan" <EMail@HideDomain.com>
| References: <05ee01c38ddc$868e7370$EMail@HideDomain.com>
<EMail@HideDomain.com>
| Subject: RE: .NET Windows authentication
| Date: Fri, 17 Oct 2003 05:45:06 -0700
| Lines: 76
| Message-ID: <0c9701c394ac$7e03f460$EMail@HideDomain.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOUrH4DxFdRyhuRTnO4ZXjw9qJuxg==
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms:54662
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Kevin, it's closed... Thanks for your help.
|
| Regards,
| Bryan C. Weis
| >-----Original Message-----
| >Hi Bryan,
| >
| >I'd like to know if this issue has been resolve. Is there
| anything that I
| >can help? I'm still monitoring on this issue.
| >
| >Kevin Yu
| >=======
| >"This posting is provided "AS IS" with no warranties, and
| confers no
| >rights."
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Bryan" <EMail@HideDomain.com>
| >| Sender: "Bryan" <EMail@HideDomain.com>
| >| Subject: .NET Windows authentication
| >| Date: Wed, 8 Oct 2003 13:41:18 -0700
| >| Lines: 21
| >| Message-ID: <05ee01c38ddc$868e7370$EMail@HideDomain.com>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Thread-Index: AcON3IaOF0znyWCvR+S8mtdjfOg/2Q==
| >| Newsgroups:
| microsoft.public.dotnet.framework.windowsforms
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| >microsoft.public.dotnet.framework.windowsforms:54006
| >| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| >| X-Tomcat-NG:
| microsoft.public.dotnet.framework.windowsforms
| >|
| >| I have a vb.net application that connects to Web
| Service
| >| pages *.asmx running on a local instance of IIS. These
| >| webservices connect to a SQL server on another machine.
| >| The web services are set to impersonate user, and
| Windows
| >| authentication. All is well.
| >|
| >| Next, I moved the webservices to another server running
| >| IIS, which happens to be the SAME machine as SQL server
| >| that these services connect to. My app can connect to
| the
| >| Web service pages, but the web service fails to
| propgate
| >| the CLIENT user/login credentials to the SQL server,
| and
| >| it uses the NT AUTHORITY\Anonymous account for some
| reason.
| >|
| >| I can't figure it out, but I've heard mention of
| similar
| >| issues being solved with modifications to
| >| Machine.config... any ideas?
| >|
| >| The point of this is that I want to use the SQL
| SUSER_SNAME
| >| () functions to restrict/change the views in SQL, so
| that
| >| function needs to return the username of the
| authenticated
| >| client.
| >|
| >
| >.
| >
|
|
| |
|
| |
 |
| |
 |
Index ‹ DotNet ‹ Winforms |
- Next
- 1
- Dotnet >> Windows Counts with C#Hi, i have this questions:
1 - How can i create user counts in Windows with C#?
2 - How can i set permissions for the counts with C#?
3 - How can i start an application with one of the
created counts?
Thanks for any help.
- 2
- ADO >> Oracle query returns table structure but no linesHello,
I'm using Microsoft's OracleClient (part of the v1.1 framework) to access an
Oracle database. I issue a select statement which is supposed to return
lines from a table, but no line is returned.
The method I use is an OracleDataAdapter that fills a DataTable. Strangely
enough, after the Fill the DataTable has Columns corresponding to the
columns in the requested table, but the Rows.Count is 0.
I tried to use a OracleCommand with ExecuteReader() instead. But it returns
no row.
The select query is very simple: "select Name,Age from employees"
Of course I tested my code with SQL server and it works alright. Am I
missing something?
Thanks for your help,
Arnaud
--
To reply, remove a "l" before the @ sign.
- 3
- Net Framework >> compatibility issue framework 1.1 to 2.0Hello
I have an application which is compiled with VS 2003, running on framework
1.1.
This application is using a thread to start a process. Everything was fine
with framework 1.1, but in 2.0 strange things are happening:
This is running on a thread:
ProcessStartInfo processStartInfo=new ProcessStartInfo();
processStartInfo.FileName=executable;
processStartInfo.WorkingDirectory=workingDirectory;
this.process=Process.Start(processStartInfo);
As i said, this was working fine with framework 1.1. When i run the same
binary on framework 2.0 beta 2, the process is still started but the
"Process.Start" method never returns! Even if the started process has
exited, the Process.Start method still hangs.
In some cases (seems randomly) the Process.Start method returns normal like
in framework 1.1. But most of the time it hangs forever.
Please help,
Bernhard
- 4
- Dotnet >> How can I make an efficient First-Come-First-Serve locking mechaniI am creating a class that has a method "Write" that I wish to make threadsafe. The method must block calling threads until the task performed in write is complete. Only 1 thread at a time can perform the task within "Write". 1-10 different threads may call "Write" simultaneously and continuously, some in a greedy manner. That is to say that some of the threads calling "Write" will take all they can get, while other threads may only call "Write" once in a while.
I have considered using a waitHandle, Monitor, or a C# lock statement however I have heard that these thread concurrency items will not guarantee first-come-first-serve to threads. This could cause the once in a while threads to get starved by the greedy threads. For example: Say that thread "a", "b", and "c" are greedy and they will each call "Write" within an endless loop. Say that thread "d" is not greedy and simply needs to to send a message every 5 seconds. Say we have the following code.
public void Write()
{
Monitor.Enter(commonlockingobject)
Thread.Sleep(500); // Simulate work
Montor.Exit(commonlockingobject)
}
Assume that all threads are started in the order a, b, c, d and of course call "Write" immediately.
So it is a given that thread a acquires the Monitor immediately and the remaining threads wait. Who will acquire the lock next? As I understand, there is no way to know for sure. It will probably be "b", but there are no guarantees.
Considering that there are no guarantees let us say that once "a" exits the Monitor "b" acquires the lock next. "a" calls "Write" again as soon as its call returns and of course "a" is blocked by Monitor.Enter. Now let us say that once thread "b" call Monitor.Exit thread "a" acquires the Monitor again (why not there are no guarantees?). Then thread "b" calls "Write" again and is again blocked by Monitor.Enter. So say thread "b" acquires the Monitor next, and then thread "a", and then "b" again, and so on. So thread "c" and "d" never get called. This is not probably but as far as I understand this could happen. Even if thread "d" wasn't able to acquire the Monitor for 20 seconds that would be unacceptable. Thread "d" should be able to acquire the Monitor after 1.5 seconds in this scenario and if the probability of each thread acquiring the lock is even thread "d" should acquire the lock on average about every 0.75 seconds.
OK so you see my problem, now how to get around this problem. Assuming that Monitor acquisition is not first-come-first-serve I must do something differently, but it must still be as efficient as possible. One of my thoughts is code similar to the following:
Queue q = new Queue();
public void Write()
{
// I could of course simply create a stack of size N where N is the
// max potential number of calling threads and put AutoResetEvents
// on the stack when they are not being used and pop them off the stack
// while they are being used, that would avoid all this object creation
// but would then require a synchronized stack wrapper which might slow things down
// even more
AutoResetEvent are = new AutoResetEvent(false);
lock(q)
{
if(q.Count > 0)
q.Enqueue(are);
else
are.Set();
}
are.WaitOne();
lock(q)
{
if(q.Count > 0)
((AutoResetEvent)q.Dequeue()).Set();
}
}
Two questions:
1) Does anyone have proof that Monitor.Enter is or is NOT first-come-first-serve? I asked a similar question before in a newsgroup and got an MVP reply as well as some others, but no one could provide a reference to a reliable source of documentation on the subject.
2) If Monitor.Enter is NOT first-come-fist-serve does anyone have a way of doing this in a more efficient manner than the code above? I am pretty certain the answer is yes, I would very much like to see the superior or better still ultimate solution to this problem.
Thanks,
-Chris Tanger
- 5
- 6
- Microsoft Project >> adjusting the row hightHello Dear,
Would you please advice how to adjust the row hight to
lower than 1? I have tried to edit the table, more
tables, edit, and what I see is the row hight and I am not
able to lower than to less than 1.
Regards,
Majid
- 7
- Visual C#.Net >> New Project Creation ProblemsHi
After installing Visual Studio .NET , if if try ot create either a C# or
Visual Basic Project using the Wizard , if get the following error message
VC package not available or not registered
TIA
Barry
- 8
- Winforms >> Background Application Appears when Hiding a Modal FormThis is a weird one that I can't seem to find an answer to yet should
be incredibly simple.
I have a main form, I display another form using the ShowDialog
method. That modal form then needs to be able to hide itself and then
launch another modal form. The code I'm using is this:
frm = New frmCostImpactCalculationDlg
Me.Hide()
If frm.ShowDialog(Me) = DialogResult.OK Then
Me.Close()
Else
Me.ShowDialog()
End If
The problem is, as soon as I call the Me.Hide method, the dialogue
disappears OK, but if any application (like an explorer window, or
Excel) is running behind the app, it suddenly appears on top of my
application. I've tried ShowDialog with and without the Me keyword
but that makes no difference. "Me" definitely refers to the dialogue
as opposed to the main form. Why on earth would another application
be bursting to the front of the screen when I hide a dialogue?
I'm running Windows 2000 on around 30 PC's. It happens on all of them
without fail.
Lee
- 9
- Dotnet >> sln associationHi,
Suddenly clicking on an SLN File type will not open Visual Studio on my PC.
Not sure what I have done. The association settings still look to be correct
but I get an error message saying that there is no program association for
the file type.
Any hints on how to fix this?
Thanks
Doug
- 10
- Dotnet >> RewritePathHi everybody,
I'm developing a simple web site for a friend of mine and I need an help for
the folloeing situation: I am planning to map friendly page name (like
'/faq.aspx') to more complicated ones (like '/displaypage.aspx?id=1'). I've
done an internet search and I found that I can achieve this using httpModule.
My first attempt was to using RwritePath in the BeginRequest event handler,
retrieving the id associated to the friendly page and rewrite the path (using
RewritePath) with the "complicated" one. Everything worked fine.
Then I thought to optimize the site in order to reduce the number of
connection to the database which stores the link between friendly pages and
ids: to do this I thought to put the Dictionary containing the associations
into the Session object in order to avoid connecting to the db after the
first load.
To do this I moved all the code from the BeginRequest handler to the
PostAcquireRequestState one. Everything seems to work fine but the
RewritePath as no effect.
Here's the bit of code:
private void context_PostAcquireRequestState(object sender, System.EventArgs
e)
{
String RequestedUrl =
HttpContext.Current.Request.Path.ToLowerInvariant();
if (System.IO.Path.GetExtension(RequestedUrl)==".aspx")
{
String ButtonKey =
RequestedUrl.Substring(RequestedUrl.LastIndexOf("/") + 1);
if (HttpContext.Current.Session["MenubarButtonsList"] == null)
{
HttpContext.Current.Session["MenubarButtonsList"] =
UserComponent.GetMenubarButtonsList(HttpContext.Current);
}
MenubarButtonsList ButtonsList =
(MenubarButtonsList)HttpContext.Current.Session["MenubarButtonsList"];
if (ButtonsList.ContainsKey(ButtonKey))
{
MenubarButton ReqButton = ButtonsList[ButtonKey];
if (ReqButton.RewritePath)
{
System.Text.StringBuilder NewUrl = new
System.Text.StringBuilder(HttpContext.Current.Request.ApplicationPath);
NewUrl.Append("/PageDisplayer.aspx?id=");
NewUrl.Append(ReqButton.Id);
HttpContext.Current.RewritePath(NewUrl.ToString());
}
}
}
}
Any idea??
Thanks.
Massimo Necchi
- 11
- Net Framework >> ExecutionEngineException in VS IDE mode onlyHi all,
I have a MC++ library that wraps an unmanaged C library. My application
gets an ExecutionEngineException only when I run in VS IDE only. If I run
my application by itself I got no exception. By the way, If I put my library
in debug mode then I also got no exception at all.
At some points, I got a NullReferenceException or ExecutionEngineException,
but not futher information.
I would appreciate for any help on this kind of exception.
- 12
- Visual C#.Net >> Array of string to Enum typesHi guy, i just wondering that is it posible to convert the array of string to
enum types dynamically, for example i get the list of countries name from
database and would like to convert all of them to Enum. If so please show me
the way to do it
Thank you very much
Thomas
- 13
- ADO >> Error while saving the data into database using shortcut key alt+SHi,
I am trying to add/update of data in a grid using the shortcut key ALT + S
that is maped to the code written to save to the data base. The form is
created using data wizard.
But i am getting the error while updating using ALT+S
error=
Exception Source=System.Data
System.Data.NoNullAllowedException: Column 'product_type_name' does not
allow nulls.
at System.Data.DataView.FinishAddNew(Int32 currentIndex, Boolean success)
at System.Data.DataRowView.EndEdit()
at System.Windows.Forms.CurrencyManager.EndCurrentEdit()
at SanctionsDisbursalTracker.frmProductType.UpdateDataSet() in
F:\projects\SanctionsDisbursalManager\SanctionsDisbursalManager\Configuratio
n\frmProductType.vb:line 226
at SanctionsDisbursalTracker.frmProductType.btnUpdate_Click(Object
sender, EventArgs e) in
F:\projects\SanctionsDisbursalManager\SanctionsDisbursalManager\Configuratio
n\frmProductType.vb:line 213
Can any one plz suggest me
Thanks
- 14
- ADO >> mdac problemi have .net framework 1.0 which was working fine before i
had installed MSDE from sqlserver2000 CD
when i have installed this MSDE .. whenever i run the
programs which use aDo.net it gives invalidoperation
exception that i need to install mdac version 2.6 or higher
i then installed mdac2.7 from component updata cd..
but the problem is still there..
i have also trie uninstalling and reinstalling that msde
from vs.net cd..
im using win2000 proffessional
- 15
- Net Framework >> Error: Can only generate one of classes or datasetsSorry for post this again (and I do not know this is the right group).
I got following error when I do:
D:\test\Dot Net\Test>xsd XMLTestConfigSchema.xsd
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 1.1.4322.573]
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Error: Can only generate one of classes or datasets.
If you would like more help, please type "xsd /?".
D:\test\Dot Net\Test>
Here is the content of XMLTestConfigSchema.xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://tempuri.org/po.xsd"
xmlns="http://tempuri.org/po.xsd" elementFormDefault="qualified"><xs:simpleType name="simpleType1"><xs:restriction base="xs:string" /></xs:simpleType><xs:element name="element1" type="simpleType1"></xs:element></xs:schema>
Why?
thx.
|
|
|