Webbrowser control and certenroll - vb.net

Hi I have a really simple program, just a webbrowser control and one line of code.
Webbrowser1.navigate "www.sspcrs.ie/sha2"
This gives a vb scripting error/exception about being unable to create a certenroll object.
If I go to the same url in internet explorer there is no problem.
For what's it worth I have tried varying the security settings in internet explorer but it does not seem to make any difference.
In the fail situation the vb script on the page tries about 3 different ways to create a cert object and then if there is an error in all three puts up an error message suggesting that activex objects be allowed and turning of protected mode.
In the success situation a Web Access dialog appears asking the user if they are willing to "allow this site to perform a digital certificate operation".

Related

MS Access: Macros remain enabled even though Trust Center Settings is Disabled

I have an MS Access 2016 application that will have a number of users who will have their Trust Center Settings set at different levels.
The form that I have set to come up automatically at start-up just has text that prompts a user to enable all content before continuing and a single 'Continue' button.
In testing this I first had my Trust Center Settings to "Disable all macros with notification". When I brought up the app, I got the Yellow Bar allowing me to enable content.
I then set the Trust Center Settings to "Enable all Macros". I brought the app down and then back up and got no Yellow Bar.
I then set the Trust Center Settings to "Disable all Macros without notification". When I brought the app down and back up I got no Yellow Bar, and I was able to execute my macros. I was hoping that the macros wouldn't work so I could continue testing for all different user security settings.
What is happening? Has my app somehow gotten on a Trusted Documents list? If so, I don't know where to look for that as there is nothing listed on the Trusted Documents dialog in MS Access.
Thanks to Andre for referring me to the Jcutrer.com site. I am only answering this question myself because I have been chastised in the past for letting a question go unanswered for longer than a day, and Andre has not posted his comment as an answer.
In brief:
Even if your Macro Trust Settings are set to "Disable all macros with notification", once you enable macros for a particular app, that app will be added to the list of Trusted Documents in your registry.
Once an app has been added to the list of Trusted Documents, regardless of your Macro Trust Settings, the macros will automatically be enabled when you bring that app up at a later date.
The Trust Settings list for MS Access is stored in the registry here:
HKEY_CURRENT_USER\Software\Microsoft\Office<Office Version>\Access\Security\Trusted Documents\TrustRecords
There are similar locations for other MS Office apps like Excel
All you need to do is go to that location in the registry, identify the app by it's file path and name, and delete that value from the registry. The next time you bring up the app it will do so in accordance with your Macro Trust Settings, e.g. if you have set it to "Disable all macros without notification" then your macros will be disabled.
Whine: Once again my question has been marked as having been insufficiently researched before posting. I tried many things in the code, and completely familiarized myself with the Trust Settings interface available to me through the File > Options interface. I searched for some time on Stack Overflow for an answer. I googled for quite some time as well. All to no avail.
In the end, the answer was in a place that was not obvious. If I had known enough to look into the registry or know that MS would willy-nilly mark an app as a Trusted Document just because I enabled the macros once, then I obviously wouldn't have posed the question.
It seems that in order for someone to be considered to have researched a question sufficiently, they basically had to come within a hair's width of the answer. What message does it send to insinuate that users are too stupid or too lazy to do a sufficient amount of work before posting on Stack Overflow?

How do disabled Form Actions work in outlook; specifically: disabling reply-all?

According To Scott Hanselman's blog post you can disable "reply-all" in your emails with a macro. I have tested this and it is also possible to disable this action with the developer tools in that are built into outlooks form editor.
It obviously only works in Outlook desktop to outlook desktop scenarios. However, when I inspect the email body or use outlookspy I can't see any thing in the message or exchange responses that would indicate that "reply-all" is disabled.
How is it possible for the receiver's client to know that reply-all is disabled? I expected some header, hidden attachment or even some trickery of exchange server, but I can't seem to find anything that explains what could be happening. I would like to replicate this functionality (in my internal corporate network) making "reply"/"reply-all"/"forward" disabled for all of our automated messages, truly making "no-reply" mean NO REPLY.
Disabling various actions on a message only works locally - the recipients do not see that information and their email client would be under no obligation to honor that request even if it was present.
You can of course use Information Right Management (https://learn.microsoft.com/en-us/exchange/policy-and-compliance/information-rights-management?view=exchserver-2019), but it is not quite the same.

Smart card, PIN, Secure HTTP, Login and Downloading and manipulating the source html - need a suitable coding langugage

I am now motivated to explore a coding language so that I can make the best solution possible.
But I am not sure of the capabilities of all coding langugages, so I am asking for advice.
I want to automate some of the daily processes I do at the office. There is an external database on the internet that we use. We access it with a smart card and secured http.
In short, these are the actions that I do each time I restart the browser or a session ends:
Open a Secured HTTP. /....jsp
After being promted I choose an installed certificate
A smart card is called and I enter a PIN. /charismatics smart security interface/
The page asks me to log in with a username and password.
I open the desired link.
I extract the data from the opened webpage manually.
Is it possible to have all these action automated by code?
THANK YOU FOR ANY SUPPORT
If you get a PIN screen from the charismatics smart card security interface instead of from the operating system then it it may be very hard to automate this. Your program is unlikely to get access to the PIN popup Window.
If you get the PIN prompt from a CSP (as you mentioned in the comments) then it may be possible to automate the PIN login. The PIN is normally used to set up the SSL/TLS connection, so having it open in the browser won't help you much, unless you program the browser itself.
If you are bound to CSP's it may be best to keep to C#/.NET. There are of course bindings for other runtimes, but it is better to have as much control as possible.
You may want to take a look at topics such as parsing HTML, because that's something you certainly need to do. Life becomes a lot harder if the web-pages are filled in using JavaScript, so you may check for that first.
Now if you want to manually choose a link you may want to render the page in your own application and handle the download yourself.
This is certainly not a task I would recommend when starting off on an unknown programming language. I would find this a tricky task - there are a lot of ifs left with this description.

Un-Share Session or Cookies of webbrowser control in VB.net

I have more than one webbrowser controls on my program, and it seams they all share session cookies.
What i want is that they DONT share the session cookies.
I have different webbrowser controls that opens the same website with different accounts, or open the same web-page that store different data in session.
Anyone has any idea?
Note : this question already posted by #Haroldis,Link old quetion Hope now he found the solution already because I having this problem also.
As mentioned in the answer you linked, this is not possible with the standard .net web browser control.
IF you genuinely need to display the pages in browsers to the user (rather than just send or recieve data, in which case webrequests are your answer) then you have a few options via third party software.
1 would be WaTin, which allows you to launch and control separate browser instances, with the option of not sharing cookies.
Another option would be awesomium, which has a .net wrapper and can run independent instances since v1.7, though i have not tested it a great deal.

Infopath 2010 field using External Data Connection of SharePoint BCS

I created an Infopath 2010, which I am then publishing to SharePoint in a forms library. My first field is a BCS field, which is pulling from CRM.
I set-up my external data field, and when I type in a name it will run the check to confirm that it is from CRM. However, if I try to use the picker it throws the error:
An error occurred while obtaining business data by using the Picker
web service. Contact your system administrator.
I have been unable to find any information regarding this error, and any help would be appreciated.
Okay, the answer was staring me in the face, and I just didn't see it the whole time. (I'm almost embarrassed to admit it!)
I had told the form to connect to the external data source through SharePoint; however the form was actually opening in InfoPath, and not via SharePoint's built in browser form. As soon as I went into the advanced settings, and said to use the browser form, and not the client application the web picker worked perfectly.
Thank you for your assistance on this issue Andreas. It was greatly appreciated.