| david 的个人资料David Yardy PE, MCSD.NET...照片日志列表 | 帮助 |
|
11月28日 Web Service Authentication with NTLMSo recently had an issue with a web application calling a web service within another web application on the same server. I created the proxy with Visual Studio and set the web service credentials via wsProxy = System.Net.CredentialCache.DefaultCredentials This would not work. I modified the code slightly so that I passed in my windows domain username and password (which is fine if calling from windows application) to the web service. Dim cr As New System.Net.NetworkCredential(wsusername,wspassword, wsdomain) This did work. So, the difference being that for ASP.NET programs, the default credentials are the user credentials of the identity for the ASP.NET worker process, or the user who is being impersonated. DefaultCredentials represents the ASPNET user account (or NetworkService user account for applications run on Microsoft Internet Information Services [IIS] 6.0) because no impersonation is set to the caller. End result was wrapping the web service call in impersonation wrapper to use the current web user (not the NetworkService account). currentWindowsIdentity = CType(System.Web.HttpContext.Current.User.Identity, System.Security.Principal.WindowsIdentity) impersonationContext = currentWindowsIdentity.Impersonate() wsProxy.Credentials = CredentialCache.DefaultCredentials Dim data as string = wsProxy.GetData("pass something in") 'call web service impersonationContext.Undo() This worked nicely and helped me avoid hard coding in a windows service account somewhere in the application. 11月21日 Read Only Properties (Web Service / WCF / Serialization)I ran into this issue with an existing object that is setup through 'adapter' pattern. The problem is that a read-only property cannot be serialized in the same way that a read/write property can be. So, what do you do with all the read-only properties? Choices...
Know of other options fill me in. WCF Wows and Woes!I am able to create a WCF Service and expose via basicHttpBinding (while hosted on IIS 6). Things are good however; the problem I am currently having is related to the proxy that gets generated from vs.net 2005. If I try to transfer a dataset in addition to my custom class the proxy generated has duplicate class type definitions. See image below for a view of both definitions. The Error List has the following error.
In my interface if I comment out the following lines things work ok. So, at this point it seems that if I try to expose a custom object type in addition to a dataset I get the error above.
If anyone has seen this issue and knows the solution please let me know. 11月19日 Enthusiastic Telerik UserTelerik continues their impressive technical support with 21 new online tutorial videos for their Asp.Net suite of tools. The videos demonstrate their consistent impressive technical support for the end user. One of the most important features for purchased components...support! The online videos are categorized by product and control feature allowing for quick navigation to technical implementation information. New videos found here (http://www.telerik.com/support/videos.aspx)
11月9日 Visual Studio 2008 - in time for Christmas 2007!Microsoft Commits to November Release Date for Visual Studio 2008 and the .NET Framework 3.5 see notes here 11月3日 LCD MonitorsEver notice in BestBuy or Circuit City that some LCD monitors just don't look as good as others? I cam across this blog entry here and a related lcd buying guide as a resource. If you are in the market for a new monitor check these out. Additional Resources
Check them out. |
|
|