SQL Server Agent Cannot Access Website Cookies in IE - cookies

We have a .NET console application which has a class which inherits from System.Windows.Forms.WebBrowser. The program is designed to navigate to a certain URL programmatically (in a headless fashion). It works without issue when the program is invoked from the command line. However, when the program is run from a SQL Server job, while the web page itself is reachable, the site's HTML returns, "Please Enable Cookies to Continue". Why would cookies not be enabled when being called from a SQL job but work fine otherwise? Both runs are done under the same user account (which happens to have local Admin rights). Furthermore, if cookies are in fact disabled, how can I enable them?
Thanks,

Related

How to avoid writing browser cookies when running testcafe tests?

I am running the testcafe tests for a website. I want to avoid writing any browser cookies while running my testcafe tests. My website writes cookies but while running tests I want to avoid this. Is there any way to achieve this in testcafe?
To disable cookies in the Google Chrome browser, follow these steps:
Find the 'Preferences' file in the Google Chrome profile and specify 2 as the profile.default_content_settings.cookies key value.   
Specify the :userProfile flag after the browser alias.
testcafe 'chrome:userProfile' /tests
If you want to have no cookies at the start of a test, note that TestCafe automatically clears cookies before each test is started.
You can use Role if you want to clear cookies at some point of your test scenario, for example, if you want to authenticate as a different user.
If your scenario is more complex, take a look at RequestMock and RequestHook - they allow you to control any aspect of all requests and responses during a test session.

execute delphi web service from browser

I've been working on a set of ISAPI web service DLLs in Delphi 2005 that interact with our server application but I'm having real difficulty debugging issues in the web services.
At this time, I have a test SOAP server application as a Web App Debugger executable which uses the same units as the real DLLs.
I can compile and run my SOAP EXE, run the Web App Debugger tool, start the ServerInfo server, and see my SOAP app in the list of Registered Servers.
If I select it from the list and click on Go, it shows the normal Service Info Page, where I can view interfaces and the WSDL.
What I now want to do is Execute one of the methods (a simple one that returns the version info of the ISAPI DLL), and view the request and response by looking at the Log tab of the Web App Debugger, however, I've not found a way to execute the method.
Do I really need to code a special client app to test my web methods? Most examples I've seen online just say to use http://server/service/class/method?parameter=value to execute a web service method, but that doesn't seem to work with a Delphi SOAP web service.
You need to change the client to connect to the machine running the WebAppDebugger. (Typically localhost)
Run the WebAppDebugger and click on the Start button. The 'default URL' lights up... by default is
http://localhost:8081/ServerInfo.ServerInfo
Then run your WAD server project within the IDE and put in your desired breakpoint somewhere in the server code.
If running your client on the same machine, change your client to use the local host address... if you connect today to:
http://www.yourhost.com/yourapp.dll/yourclass/yourmethod
change the client to connect to something like this for debugging the traffic:
http://localhost:8081/wadClassName/yourclass/yourmethod
The name of the Web Application Debugger class is defined when you create the WAD project.

Compile JSP & Java on browser refresh - Tomcat

Is there any way to setup Tomcat server so whenever I make changes to Java class or JSP page the change is visible on browser refresh.
I'm bored stopping and starting Tomcat. I want to configure Tomcat like the way WAMP works [where you can see the PHP code change upon browser refresh]
If it's for development mode that's ok. Don't use it for production stuff.
You don't have to restart the server. You can restart the app through the Tomcat Manager.
You can even do this directly as: http://[hostname]:[port]/manager/reload?path=[/path/to/your/webapp]
or
Define your context as reloadable
Be careful: It is NOT recommended to place elements directly in the server.xml file
Check out the Tomcat configuration guide
For java classes: reloadable
Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.
NOTE - The value for this property will be inherited from the reloadable attribute you set on the surrounding Context component, and any value you explicitly set here will be replaced.
(http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html)
For JSP: development ($CATALINA_BASE/conf/web.xml)
development - Is Jasper used in development mode? If true, the frequency at which JSPs are checked for modification may be specified via the modificationTestInterval parameter.true or false, default true.
Hope this helps

Yet another elmah problem ... works everywhere but production

I have elmah setup to use SqlErrorLog and this is running fine on both my local using the developer webserver, and my integration environment under IIS. On my production box elmah is able to log exceptions with XmlFileErrorLog writting to the app_data directory. When I switch back to SqlErrorLog I get nadda. I have ensured that the database exists has the required table and three procedures. I have tested the connectionstring. I have compared the web.configs from my local to prod and the only differences are the database server name in the connection strings.
Any thoughts as to what else can be blocking in a production installation?
~-=Mike=-~
Have you properly setup the permissions on the database for ELMAH? Depending on if you are you using impersonation with your web application, you may have to grant privileges to additional users to the stored procedures/tables.

Accessing scripts inside IIS virtual directory

I have an IIS 6 server with a virtual directory pointing to a network share on another machine. That web server also serves ColdFusion scripts. When I access regular HTML pages that reside in the virtual directory, they are served properly. Anytime I try to get to a ColdFusion script, however, ColdFusion throws a "File not Found" error.
Am I missing a step? Is there something else that I have to do in ColdFusion to tell it where the files in that virtual directory actually exist?
This sounds like you may need to alter the permissions that ColdFusion runs under and that right now it does not have sufficient permissions to access the network share.
To change the permissions or user CF runs under:
Open Services
Find the CF Service (depending on your version it might start with Macromedia...)
Right Click, Open Properties
Click on Log On
Then either change the account it logs on as or change the permissions for the current user.
Click OK, Apply, etc...
I'm pretty sure you will have to bounce the CF Service.