ActiveX Component On The Web
Hi,
I have created an activex Control (.ocx) in VB and i am trying to put it on the web. In client server it works perfectly fine. can any one help me how to deploy it on the web. i know that i have to write the java bean for that component but i am not sure from where to start. if i get one sample file then it will be great help.
thanks.
Regards
gaurav
Irene
Are you using Component Works in Visual Basic? I've haven't seen this problem before. See you you can get the attached example to work in IE 6.0. Opent the htm file, it sets a cw activex component into a web page. I was able to on my machine.
Brian
Attachments:
activex.zip 833 KB
Similar Messages
-
Can not publish the contains of the activeX container to the web.
It is easy to publish the front panel to the webserver. But in my application everything on the front panel appears on the web page but the contains of the activeX container (it is images from a web camera!). Does any one knows how to solve this? Is there any restriction on what objects on front panel can be publish to the web server?
I know that you can publish the contents of an activeX container. I have done it several times. It is probably something to do with the activeX control you have placed in it. For instance, it might be that the image from the web camera is updating when the snap of the front panel is taken so that the image of the container seems blank. It also might have something to do with the picture depth you are using. Try playing around with some of the publishing settings you have available such as monitor, snap, refresh rate, picture depth, etc and see if any of them have any effect.
-
In the Firstcup tutorial, the responsibilities of the web tier are listed as:
dynamically generate content for the client
collect input from the user
return results from business tier components
control the flow of client screens & pages
maintain session state
perform basic logic
hold data temporarily in JavaBeans components
Which of these responsibilities would retrieving data from a web service fall under?
The tutorial also lists the technologies used in the web tier, and JAX-RS is not included in that list. The list of technologies used by the business tier does, however, list JAX-RS. I was surprised to find the DukesBDay JavaBeans component (in the web tier) calling the dukes-age web service, instead of the DukesBirthdayBean EnterpriseBean (in the business tier), which uses hard coded value for Duke's birth date.
Is it typical for the web tier to consume web services in this way? What about when using an application client container, wouldn't that skip the web tier altogether, and in doing so also skip the web service call? Wouldn't DukesBirthdayBean in the business tier benefit from making the call to the web service, instead of having the date hard coded into it, and wouldn't this also solve the problem of the missing web service call when using an application client container?Hi Shadab,
Here is a list of Web service standards supported by SAP in NetWeaver 7.1.1: [Supported Standards|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/624479f7e608fae10000000a422035/frameset.htm] (also in [7.0|http://help.sap.com/saphelp_nw70/helpdata/EN/44/624479f7e608fae10000000a422035/frameset.htm] and [7.0.1|http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/44/624479f7e608fae10000000a422035/frameset.htm]). The Enterprise Services adhere to these standards, and on the provider side you have the tools to configure the authentication settings as needed. On the consumer side, one just has to use a Java release (or any other platform) that supports these standards.
While I am not a Java developer, there should be [many ways to consume a Web service in Java|http://www.google.bg/search?q=consumewebservice+java].
Hope this helps,
Rossen -
Acrobat - Cannot create ActiveX component
I'm using Visual Studio 2005 (.Net 2.0) Console Application to interact with Acrobat 9. I'm trying to open an existing PDF and Save as TIFF (using the JSObj = PDDoc.GetJSObject() and JSObj.SaveAs()). On the development computer with Acrobat 9.1.3 installed it works fine. If I move the executable to my colleague's development machine (Acrobat 9.2) the code throws error: Cannot create ActiveX component. The Interop.Acrobat.dll resides in the same folder as the .Net exe. Last month, this worked fine on my collleague's computer. What has changed on his computer to prevent the ActiveX component from launching? Below is the code snippet. Other info: Acrobat 9.2 is the only Adobe app installed on the destination computer.
Any ideas would be helpful.
Dim PDFApp As Acrobat.AcroApp
Dim PDDoc As Acrobat.CAcroPDDoc
Dim AVDoc As Acrobat.CAcroAVDoc
Dim JSObj As Object
Try
' Create Acrobat Application object
PDFApp = CreateObject("AcroExch.App")
' Create Acrobat Document object
PDDoc = CreateObject("AcroExch.PDDoc")Just realized I replied to my own message...
The repair did not work.
Notes:
===============================================================
- When I open the Acrobat UI with a PDF and then Save as TIFF, it works great.
- Event Viewer: System Error: The server {85DE1C45-2C66-101B-B02E-04021C009402} did not register with DCOM within the required timeout. I checked this ClsID in the Registry and it's the PDFShellInfo Class ("C:\Program Files\Adobe\Acrobat 9.0\Acrobat\AcrobatInfo.exe" /PDFShell).
Should I uninstall Acrobat and re-install? I'm at wits end...
Thanks in advance. -
Error when opening page with the web browser activex
I have downloaded the example for using the web browser activeX component to display a web page. It basically works, but it keeps returning an error (from NI's web site) that I don't see when opening the site from IE. The message I get is:
Are there things that need to be initialized when calling the browser in this way?
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First StepsMike,
It looks like ni.com is not supplying that particular console object which is causing an issue with the embedded instance of IE9. Every other website I've tried works correctly. I've looked around the ActiveX methods to intercept and ignore this error, but I haven't found anything yet.
For others' reference, here is the link to the example:
https://decibel.ni.com/content/docs/DOC-2042
Karl G.
Applications Engineer
ni.com/support -
ActiveX and the Web: The Inside Story
Am I right in believing thusly:
I am a financial analyst who's looking for the current foreign
exchange rate for various currencies every second moment. For this I
always telephone Phil de Lucre, the brokers and dealers of the forex
markets. They now have a website where I can logon and get the rate
online. Cool, I think.
I type the URL of their website, which looks like
http://www.ForexRatesOnYourTips.com/Calculator.asp, and lo! I am
greeted with a page that says, choose the currency for which you wish
to compare the rate against the Indian Rupee (INR). That makes me
happy. Then they have a textbox that says, now enter the amount in
Indian Rupees (INR) whose equivalant you wish to see in the foreign
currency. I enter Rs.100. "Good", I am thinking. Then I hit a button
captioned "Get me the darn rate and make it quick!".
[BEHIND THE SCENES]
Phil de Lucre created one ActiveX DLL called Foo that knows exactly
how to convert exchnage of one currency into another. Foo proudly
resides on the web server of Phil de Lucre and brothers. Mr.Mone Flee,
the programmer at Phil de Lucre, commands in VBScript,
Dim ObjFoo
Set ObjFoo = Server.CreateObject("Lib.Foo")
And magically so, an object of the wonderous Foo is instantiated on
the web server. The web server reads requests made by my browser's
button "Get me the darn rate and make it quick!" and passes it on to
Foo in the Foo language. Foo, like it were a child's play, ardently
returns the rate converted to the web server. The web server whips
HTML out of it and displays on my page, the much coveted rate.
[/BEHIND THE SCENES]
Makes me happy. Is this all about how ActiveX DLLs work in ASP? If I
am right, let's proceed with a case of an ActiveX control. How do they
work?
Let's warp the scene a bit. Foo is not a COM DLL, but this time with
version 2, its just got a bit smarter and dainty with a dazzling
interface. It is now reborn as an ActiveX Control, and all the people
at Phil de Lucre make love to celebrate the new avatar.
When I hit the "Get me the darn rate and make it quick!" button this
time, what happens? No no! More importantly, I beleive something
happens even earlier, the moment I type
http://www.ForexRatesOnYourTips.com/Calculator.asp, right?"Sathyaish" wrote in message
news:[email protected]...
> Am I right in believing thusly:
>
> I am a financial analyst who's looking for the current foreign
> exchange rate for various currencies every second moment. For this I
> always telephone Phil de Lucre, the brokers and dealers of the forex
> markets. They now have a website where I can logon and get the rate
> online. Cool, I think.
>
> I type the URL of their website, which looks like
> http://www.ForexRatesOnYourTips.com/Calculator.asp, and lo! I am
> greeted with a page that says, choose the currency for which you wish
> to compare the rate against the Indian Rupee (INR). That makes me
> happy. Then they have a textbox that says, now enter the amount in
> Indian Rupees (INR) whose equivalant you wish to see in the foreign
> currency. I enter Rs.100. "Good", I am thinking. Then I hit a button
> captioned "Get me the darn rate and make it quick!".
>
> [BEHIND THE SCENES]
> Phil de Lucre created one ActiveX DLL called Foo that knows exactly
> how to convert exchnage of one currency into another. Foo proudly
> resides on the web server of Phil de Lucre and brothers. Mr.Mone Flee,
> the programmer at Phil de Lucre, commands in VBScript,
>
> Dim ObjFoo
> Set ObjFoo = Server.CreateObject("Lib.Foo")
>
> And magically so, an object of the wonderous Foo is instantiated on
> the web server. The web server reads requests made by my browser's
> button "Get me the darn rate and make it quick!" and passes it on to
> Foo in the Foo language. Foo, like it were a child's play, ardently
> returns the rate converted to the web server. The web server whips
> HTML out of it and displays on my page, the much coveted rate.
> [/BEHIND THE SCENES]
>
>
> Makes me happy. Is this all about how ActiveX DLLs work in ASP? If I
> am right, let's proceed with a case of an ActiveX control. How do they
> work?
>
Yes, you are right! There are *some* constraints on using an activeX
dll from an ASP script; All variables must be passed ByVal, and you have to
remember that the dll runs with the accessrights of the web-user account.
But apart from that, no great concerns...
> Let's warp the scene a bit. Foo is not a COM DLL, but this time with
> version 2, its just got a bit smarter and dainty with a dazzling
> interface. It is now reborn as an ActiveX Control, and all the people
> at Phil de Lucre make love to celebrate the new avatar.
They shouldn't...
An activeX *Control* opens a whole new can of worms.
>
> When I hit the "Get me the darn rate and make it quick!" button this
> time, what happens? No no! More importantly, I beleive something
> happens even earlier, the moment I type
> http://www.ForexRatesOnYourTips.com/Calculator.asp, right?
Right!
Because now, Mr. Mone Flee have replaced the serverside call:
Dim ObjFoo
Set ObjFoo = Server.CreateObject("Lib.Foo")
with the following:
classid="clsid:28077E35-EE6F-4EFE-B274-7798CDB4CDCD"
id="theFantasticCurrencyConverter">
Which tells your browser to go into the registry to look up the
component known by the name "28077E35-EE6F-4EFE-B274-7798CDB4CDCD",
and start it. Now, all the work are done locally on your computer.
This component must of course be present on your computer, and if not,
will result in one of two things...:
If Mr. Flee have included in his object tag a hint to where the componenet
can be found, a download and installation will occur...
....if not, the expected glorious interface will be replaced with a tiny
little picture of a red "X".
The "can of worms" part, lies in that if you download this component,
you place the life and sanity of your computer in the hands of Mr. Flee.
Because when his component are installed on your PC to do its job, its
given the full run of whatever code can do on a computer.
Dag. -
The Web Dynpro component cannot be generated due to serious (syntax) errors
Hi everybody,
While I was developing a web dynpro application, I had an error but I couldn't understand this error. Before I took this error message, only I changed bound one context node to another context node in a RadioButtonGroupByKey.Therefore, when I pushed activate button, I took an error message.This error message said "The Web Dynpro component cannot be generated due to serious (syntax) errors". What does it mean ? How can I find out where is the error in the application. Also, I think the reason of this error message is about a BC problem. I am waiting for your comment urgently.Hi ,
Just delete the context (by using the context binding) and bind the field with the correct node and try to activate .
One more suggestion is that after deleting the binding and before binding to other node check it that whether that binding was properly deleted or not.Some times its not deleting the binding.
Hopely my suggestion may work.
Regards,
Satya -
Enhancement of component ERP_H with a custom field in the Web UI
Hi,
I'm facing an error when enhancing the component ERP_H with a custom field in the web UI.
I've followed the steps mentioned in the pdf document called "Enhancement Options for the Lean Order Interface" (Note
1224179):
I´ve done a enhacement on ERP_H component.
I added a field to the view Headerdetail called "ZZCCTYPE1", but when I set a value in UI, I haven´t read this field in abap code.
The SET method (SET_ZZCCTYPR1) in the context node is ok, in debug I see that the method current->set_property, is working fine.
I've tried to read the atribute with lr_entity->get_property_as_string ( 'ZZCCTYPR1' ), but doesn´t work. When I read other "standard field", the statement is ok and it has value.
When I set the value of the field from ECC (VA01/VA02), it is kept by the system.
Could anybody help me?
Thanks in advance,
Regards,
Andrea RicciHi,
To add a new field, you have to first create it through T-Code EEWB where in you create a project, create extension which is assigned to a business object and create the new field through wizard - specifying the field name , type and length.
Once this is done, you can check the new field coming up in available fields for the relevant component's view in Tcode BSP_WD_CMPWB.
Hope this helps you out.
Cheers
Ravindra Valy
"Award Points if it is helpfull" -
Enhancing the component ERP_H with a custom field in the web UI
Hi,
I'm facing an error when enhancing the component ERP_H with a custom field in the web UI.
I've followed the steps mentioned in the pdf document called "Enhancement Options for the Lean Order Interface" (Note
1224179):
I´ve done a enhacement on ERP_H component.
I added a field to the view Headerdetail called "ZZCCTYPE1", but when I set a value in UI, I haven´t read this field in abap code.
The SET method (SET_ZZCCTYPR1) in the context node is ok, in debug I see that the method current->set_property, is working fine.
I've tried to read the atribute with lr_entity->get_property_as_string ( 'ZZCCTYPR1' ), but doesn´t work. When I read other "standard field", the statement is ok and it has value.
When I set the value of the field from ECC (VA01/VA02), it is kept by the system.
Could anybody help me?
Thanks in advance,
Regards,
Andrea RicciHi Pooja,
When you created your custom views, did you bind the view context nodes to the corresponding context nodes of your component controller?
From the exceptions you reported it seems that this binding is missing.
To create this binding, you can right click on your view context node , choose "Create Binding" and bind it to the context nodes of your Component Controller.
Hope this helps.
Regards,
Nisha -
Coming up with the error - "Runtime error '429': ActiveX Component Can't cr
Hi,
While trying to edit the XML tag in a .rtf file (Microsoft Word 2010), coming up with the error - "Run time error '429': ActiveX Component Can't create object.
Any help in resolving this is greatly appreciated.
Rgds,
Kiran PanditiRemove and reinstall dotnetfiles by running setup.exe located at the following path:
32 Bit Win 7
C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\DotNetInstallFiles
64 Bit Win 7
C:\Program Files (x86)\Oracle\BI Publisher\BI Publisher Desktop\DotNetInstallFiles
FYI, BI Publisher Template Builder 10.1.3.4 does require Administrator rights to run.
Cheers,
ND
Use the "helpful" or "correct" buttons to award points to replies / Mark the thread as answered, if your question is answered. -
Passing a collection to the ActiveX component / copying a collection to another
[Migrated from the Syclo Resource Center]
KarthikSetty 05/06/2011 10:48,
Hi,We need to pass a collection to an ActiveX component. With 5.2.8 this is possible. My collection needs to be selected dynamically. If it were a property I can be easily set using a rule. But I dont see how I can return a collection through a rule. One of the scenarios that we need to implement is to pass a list of notification objects for a particular work order, where the work order id is set by the activex component as an eternal value.What I was thinking of doing is to have a dummy notification collection under the main object which I would populate based on the work order id. The Agentry value of the Active X will point to this.
Is there a easy way to copy the contents from one collection to another?I need to copy the notification object from MainObject -> select WorkOrder by key -> Notification Collection to MainObject -> Temp Notification Collection.The only way to copy a collection is to loop through the collection and copy each object individually. Is there a way to do this in one step?
Thanks,Karthik
Jason Latko 05/06/2011 11:12
Karthik,Unfortunately there is no easier way to do this.
You need to go about it the way you suggested one at a time by looping over the parent collection and adding objects to your new collection, initializing each property value "from other object" in the add transaction.
Jason Latko - Senior Product Developer at Syclo
KarthikSetty 05/06/2011 14:24
Alright, Thanks for your response.[Migrated from the Syclo Resource Center]
KarthikSetty 05/06/2011 10:48,
Hi,We need to pass a collection to an ActiveX component. With 5.2.8 this is possible. My collection needs to be selected dynamically. If it were a property I can be easily set using a rule. But I dont see how I can return a collection through a rule. One of the scenarios that we need to implement is to pass a list of notification objects for a particular work order, where the work order id is set by the activex component as an eternal value.What I was thinking of doing is to have a dummy notification collection under the main object which I would populate based on the work order id. The Agentry value of the Active X will point to this.
Is there a easy way to copy the contents from one collection to another?I need to copy the notification object from MainObject -> select WorkOrder by key -> Notification Collection to MainObject -> Temp Notification Collection.The only way to copy a collection is to loop through the collection and copy each object individually. Is there a way to do this in one step?
Thanks,Karthik
Jason Latko 05/06/2011 11:12
Karthik,Unfortunately there is no easier way to do this.
You need to go about it the way you suggested one at a time by looping over the parent collection and adding objects to your new collection, initializing each property value "from other object" in the add transaction.
Jason Latko - Senior Product Developer at Syclo
KarthikSetty 05/06/2011 14:24
Alright, Thanks for your response. -
BPC V7 Install process the dimension error "ActiveX component can't create"
All,
We are installing BPC v7 M on SQL 2008.
We have split server Install. We have installed everything as advised by the install guide.
The install for V7 was successful. We can Modified all the app with in the appset. The server manager has all Green checkes.
But wen we process the dimension we get ActiveX component can't create objectObject variable or With block variable not set error.
I have seen this post as well - Re: BPC migration to 7.0
We have make sure our secuirty to the database is working.
We have make sure the xceedzip.dll is in the correct folder.
We can also have installed BPC clinet and Admin few times and re started the server fre times.
Can any one help? any other suggestion?
thanks
Sam
Edited by: Sam Patel on Nov 4, 2009 5:59 PMnilanjan chatterjee, Sorin,
Thanks for helping, As stated The Microsoft SQL Server 2005 Backward Compatibility Components on Microsoft SQL Server 2008 Feature Pack was not installed on app server and causing the problem.
I have installed that patch on APP server and all is working.
Points are awarded.
Sam
Edited by: Sam Patel on Nov 5, 2009 10:58 PM
Edited by: Sam Patel on Nov 5, 2009 10:59 PM -
How do I reduce the size of large pdf using activex component?
possible reduce pdf size using activex component? also as in menu adobe acrobat "document" -> "reduce file size"
possible reduce pdf size using activex component?
No. -
How to use the Web Dynpro Component Interface
Hi, All
Error when processing your request
What has happened?
The URL http://erp2005.besuretech.com:8000/sap/bc/webdynpro/sap/zz_test5/ was not called due to an error.
Note
The following error text was processed in the system E05 : Error when Creating Component ZZ_TEST6. ZZ_TEST6 Is a Component Interface, Therefore, an Instance Cannot Be Created. Name of Component May Not Be Specified. (Used Component: ZZ_TEST5, Component Usage: MYCOMPUSAGE)
The error occurred on the application server erp2005_E05_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: IF_WD_COMPONENT_USAGE~CREATE_COMPONENT of program CL_WDR_COMPONENT_USAGE========CP
Method: RESOLVE_MAPPING of program CL_WDR_CONTEXT_NODE_INFO======CP
Method: MAP of program CL_WDR_CONTEXT_NODE_MAP=======CP
Method: MAP of program CL_WDR_CONTEXT_NODE_MAP=======CP
Method: IF_WD_CONTEXT_NODE~GET_ELEMENT of program CL_WDR_CONTEXT_NODE_MAP=======CP
What can I do?
If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system E05 in transaction ST22.
If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server erp2005_E05_00 in transaction SM21.
If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server erp2005_E05_00 . In some situations, you may also need to analyze the trace files of other work processes.
If you do not yet have a user ID, contact your system administrator.
Error code: ICF-IE-http -c: 600 -u: LIPEI -l: E -s: E05 -i: erp2005_E05_00 -w: 0 -d: 20070120 -t: 212436 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
HTTP 500 - Internal Server Error
Your SAP Internet Communication Framework Team
How can i do?
ThanksHi,
There is something wrong in the definition of component usage in your component. Maybe you forgot to instantiate the use component, maby the name you are using is not correct. Try to find it in that direction.
Good Luck,
Ben -
Cannot create ActiveX component
So, I've looked all over for an answer for this one and so far, everything I've seen offered as fixes do not work.
Exception Details: System.Exception: Cannot create ActiveX component.
Source Error:
Line 39:
Line 40: ' Create Acrobat Application object
Line 41: PDFApp = CreateObject("AcroExch.App")
I have a webserver on which is installed the latest version of Acrobat Standard.
Here is my code:
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Configuration
Imports System.Data.OleDb
Imports System.Security
Imports System.Security.Principal
Partial Class CodeTest
Inherits System.Web.UI.Page
Dim LOGON32_LOGON_INTERACTIVE As Integer = 2
Dim LOGON32_PROVIDER_DEFAULT As Integer = 0
Dim impersonationContext As WindowsImpersonationContext
Declare Function LogonUserA Lib "advapi32.dll" (ByVal lpszUsername As String, _
ByVal lpszDomain As String, _
ByVal lpszPassword As String, _
ByVal dwLogonType As Integer, _
ByVal dwLogonProvider As Integer, _
ByRef phToken As IntPtr) As Integer
Declare Auto Function DuplicateToken Lib "advapi32.dll" ( _
ByVal ExistingTokenHandle As IntPtr, _
ByVal ImpersonationLevel As Integer, _
ByRef DuplicateTokenHandle As IntPtr) As Integer
Declare Auto Function RevertToSelf Lib "advapi32.dll" () As Long
Declare Auto Function CloseHandle Lib "kernel32.dll" (ByVal handle As IntPtr) As Long
Private Sub savePDFtoTIF(ByVal fullPathPDF As String, ByVal fullPathTIF As String)
Dim PDFApp As Acrobat.AcroApp
Dim PDDoc As Acrobat.CAcroPDDoc
Dim AVDoc As Acrobat.CAcroAVDoc
Dim JSObj As Object
If impersonateValidUser("XXXXXXX", "", "XXXXXXXXXX") Then
' Create Acrobat Application object
PDFApp = CreateObject("AcroExch.App")
' Create Acrobat Document object
PDDoc = CreateObject("AcroExch.PDDoc")
' Open PDF file
PDDoc.Open(fullPathPDF)
' Create AV doc from PDDoc object
AVDoc = PDDoc.OpenAVDoc("TempPDF")
' Hide Acrobat application so everything is done in silentmode()
PDFApp.Hide()
' Create Javascript bridge object
JSObj = PDDoc.GetJSObject()
' Attempt to save PDF to TIF image file.
' SaveAs method syntax .SaveAs( strFilePath, cConvID )
' For TIFF output the correct cConvid is
' cCovid MUST BE ALL LOWERCASE.
JSObj.SaveAs(fullPathTIF, "com.adobe.acrobat.tiff")
PDDoc.Close()
PDFApp.CloseAllDocs()
' Clean up
System.Runtime.InteropServices.Marshal.ReleaseComObject(JSObj)
JSObj = Nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(PDFApp)
PDFApp = Nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(PDDoc)
PDDoc = Nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(AVDoc)
AVDoc = Nothing
undoImpersonation()
Else
lblStatus.Text = "Unable to impersonate"
Exit Sub
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
savePDFtoTIF("D:\DoH\998.110803030832.pdf", "D:\DoH\Project\000.tif")
End Sub
Private Function impersonateValidUser(ByVal userName As String, _
ByVal domain As String, ByVal password As String) As Boolean
Dim tempWindowsIdentity As WindowsIdentity
Dim token As IntPtr = IntPtr.Zero
Dim tokenDuplicate As IntPtr = IntPtr.Zero
impersonateValidUser = False
If RevertToSelf() Then
If LogonUserA(userName, domain, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, token) <> 0 Then
If DuplicateToken(token, 2, tokenDuplicate) <> 0 Then
tempWindowsIdentity = New WindowsIdentity(tokenDuplicate)
impersonationContext = tempWindowsIdentity.Impersonate()
If Not impersonationContext Is Nothing Then
impersonateValidUser = True
End If
End If
End If
End If
If Not tokenDuplicate.Equals(IntPtr.Zero) Then
CloseHandle(tokenDuplicate)
End If
If Not token.Equals(IntPtr.Zero) Then
CloseHandle(token)
End If
End Function
Private Sub undoImpersonation()
impersonationContext.Undo()
End Sub
End Class
The impersonation works, as I use the same code on another page where I am manipulating file system objects through that account, with this code. Also, the code without the impersonation, works on my local machine perfectly.
Any ideas on what to do would be greatly appreciated.
JusticeLook, I got dragged into a project that was late from the start, but is a big contract for the printing company that I work for that uses a lot of Adobe products internally for what they do.
In good faith, I tried to purchase something that would work. I was in a rush and didn't read the entire EULA as I was installing it. Obviously, I wasn't trying to screw the system or I wouldn't have been here, posting about it. I also do not need an education about what is true or false on the internet. I need a solution now that is going to meet the customers needs based on what is provided here. Rather simple, and don't reallly have the time for an entire formalized consultation as to our "business needs", since this is really all we need it for and time is of the essence.
If the best Adobe can do is publicly slap customers around on forums and throw vague answers out to follow up on, then I guess it's time to seek out other solutions for our business needs.
Maybe you are looking for
-
Hi, I want to implement a validation for Vendor Down Payments. When a user enters a PO line item into a down payment document, I want to check if the amount of the PO's line item is greater then the down payments line item. Where can I set this
-
Hi Experts, I am dealing with Idoc to WS scenario, where the same Idoc is having the multiple instances replicated(50 Idoc data). Depending upon the condition, the WS has to be posted to the corresponding site. We can do this by using BPM or be spl
-
How to find and replace certain text in Excel.
I am new to Automator. And I would like some help how I can create a service that will allow me to find and replace certain text in Excel. I noticed that there is an action to do this for Word documents, but not for Excel documents. Any suggestions h
-
Ray tracing fault won't allow me to use AE
Hi guys, I just downloaded the trial version of AE from the Adobe website. But when I open it, I recieve an error saying that ray-tracing on the GPU requires an approved NVIDIA graphics card. I read all the other discussions, but I cannot change anyt
-
Hi, OS: OEL 4.8 I face an error while doing copy process from one file system to another filesystem on the same machine, below is the error message cp reading 'filename.dbf' input/output error Regards