473,625 Members | 3,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copied From webservices ng: WebService w/Custom Principal

We have a class that Implements IPrincipal
(System.Securit y.Principal.IPr incipal). We have a business logic class
library assembly that checks the Principal object for role information to
see if the currently logged in user has access to specific roles...

<snip>
Public Class MyBusinessLogic
Inherits ServicedCompone nt

<AutoComplete() > _
Public Function Fetch() As Schema.MyTypedD ataSet
Dim p As Principal = DirectCast( _
Threading.Threa d.CurrentThread .CurrentPrincip al, _
Principal _
)

If Not p.IsInRole("My Role")
Throw New SecurityExcepti on("Missing access to My Role.")
End If

...
End Function
End Class
</snip>
Now we are trying to implement a web service that calls the Business Logic
class methods, but it fails because in the web service, the
Threading.Threa d.CurrentThread .CurrentPrincip al object is not the same as in
the web application doing the calling. How can we get this Principal to be
set in the Current Thread of the Web Service?

Note: The Principal object has a property called Identity which is of type
IIdentity, which cannot be serialized.

Thanks in advance,
Mythran

Nov 21 '05 #1
0 919

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1721
by: Erik P. Vinther | last post by:
Hi This might be slightly OT, but I couldn't find a better NG for this question The question is regarding versioning of webservices. A webservice end point URL basically consists of a base company URL and a webservice name, e.g… webservices.MyCompany.com/MyService we want to be able to host several versions of a particular webservice at the same time, so we want the version id to be part of the end point URL. This is consistent...
8
1722
by: Allan Ebdrup | last post by:
I just had a discussion with one of my fellow programmers. We have a class for doing some logging and sending an email, it has 5 different scenarioes of loggin that are common enough to share a class and database tables. In the future there might be new scenarioes that require their own custom classes and database tables. Now we want to expose some of our logging class's methods as webservices (more a group of function calls called in...
4
3187
by: nixon | last post by:
Hi there! Im trying to build a 3 tier application that uses a smartclient in the "view" layer. The communication between the smartclient and the server should be webservices because of potentiel firewall issues. I´ve looke at to smartclient demos to figure out how the experts do the stuff, design and overall architecture, Microsofts IssueVision and TaskVision. These applications uses DataSet´s to communicate between the layers and
1
3204
by: Vinoth Kumar | last post by:
Hi All, I have a problem in throwing custom exceptions from a webservice method. The custom exception is being converted into soapexception in the webservice client. only the custom exception message is present in the soapexception . Is there any way to get the exact custom exception instead of soapexception? Thanks in advance
8
4006
by: Komandur Kannan | last post by:
We have a smart device application running on handhelds(Symbol MC9000G). The backend is Oracle and a middle tier web services development done in Vb.net. We use pessimistic Locking due to specific business needs When such a lock is made for a transaction (this code is in the web service) and the handhelds are terminated abnormally (cold booted or battery low), the lock still remains. The Web service's connection to oracle is still...
0
1672
by: Grant Wickman | last post by:
Our team has just fixed a really nasty problem that appears to be caused by an obscure bug in the sort method of Arraylist and daisy-chained webservice stubs. We've fixed the bug so I'll not investigate any further but there was nothing about it when googling the newsgroups so I am posting a note in case it helps somebody else out. The problem was in a system with a web front end calling through to a chain of 3 webservices i.e.
10
10570
by: smarty | last post by:
Hi, I have written a WSE in vis studio 2005 as and produced a dll that I can use in other projects by including the following in the web.config. <webservices> <soapextensiontypes> <add type="traceextension, simpleModule" priority="1" group="high"/> </soapExtensionTypes> </webservices>
2
2240
by: KaNos | last post by:
Hello world, I've made a webservice (c# v2) to install in a server IIS 6 on a Windows 2000 last SP. We can use the webservice in local, throw the pages wich present the methods, with a windows mode connection (<authentication mode="Windows"/>) if impersonate is false (<identity impersonate="false"/>). Note that i use the administrator user to be sure. But when I change impersonate element (<identity impersonate="true"/>) a system...
1
1978
by: Jon Ebersole | last post by:
I am developing a webservice and a windows application that talk to each other. They are using a standard VB class library in the background. I am having problems understanding why I can't sync my namespaces properly. Example; My Windows namespace is MyCompany.MyWindowsSpace My Webservice namespace is MyCompany.MyWebService My Class Library namespace is MyCompany.MyLibrary I am using typed objects to send back and forth to my...
0
8259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8696
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7188
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6119
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1504
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.