how to launch a url in IE for windows mobile6.5 - mfc

how to launch url from code in IE .
My application is for windows mobile6.5 and i am using VS2008.

Call ShellExecuteEx with the URL and the default browser will open.
If you want to specifically target a browser, call CreateProcess with the browser path (\windows\iexplore.exe) and your destination URL as the command line.

Related

ColdFusion 2018: How to setup a mapping correctly?

These are the steps I use:
1) I created new mapping inside CF Server => Server Settings => Mapping
logical path: /mysite
directory path: /Volumes/drive2/work/mysite
2) I restarted the server
/Applications/ColdFusion2018/cfusion/bin/coldfusion stop && /Applications/ColdFusion2018/cfusion/bin/coldfusion start
3) Using my preferred text editor, I created test.cfm inside /Volumes/drive2/work/mysite with the following contents
<cfdump var="#CGI#">
4) I then tried viewing the new file on my browser via
localhost:8500/mysite/test.cfm
I then get a 404 error. Exact message goes like "coldfusion.runtime.TemplateNotFoundException: File not found: /mysite/test.cfm"
I checked these 2 things:
I verified that /Volumes/drive2/work/mysite is readable by everyone (755 permission)
I verified that /Volumes/drive2/work/mysite/test.cfm is readable by everyone (644 permission)
Other than creating the mapping, the other configurations I've changed are:
created datasource for my app
Enabled debugging/logging but only after I got the first 404 error
Any ideas what I could be doing wrong? or perhaps other settings I should've set? I've added a screenshot of the mappings section below.
Thanks!
Edit: I'm using the built-in webserver provided by the standalone/developer edition. I'm also using localhost.
What you are attempting to do is not what ColdFusion mappings are for. ColdFusion mappings are used by ColdFusion code to access files. What you are attempting to do via a request like localhost:8500/mysite/test.cfm is access a folder through your web server. What you need to do for that is create a "virtual directory" using your web server admin.
You did not specify which web server you are using but it should be very easy to find documentation on how to accomplish what you need by searching your "web server name create virtual directory".
Here are a couple of examples for IIS and Apache.
IIS Virtual Directory
Apache Alias
If you are using the builtin Tomcat server, as we can assume by the use of localhost and port 8500, then follow the directions documented on the following page under the Adding a virtual directory for ColdFusion using the built-in Tomcat application server section.
ColdFusion Tomcat

How do I change the localhost:8500 to something else in coldfusion

I have set up ColdFusion 9, as this is an old system, and have to change the host path. All of the code is already there, but it does not work because the path is wrong and it keeps redirecting.
The current default path is localhost:8500, but I need it to redirect to localhost:8500/newdir/. I thought by changing my systems32\drivers\etc\hosts file this would work, but it hasn't.
Windows with internal server for ColdFusion9, Apache.
Would like to redirect the host.
You need to edit the Mappings in the Server Settings section of the ColdFusion Administration.
Add a Mapping with / as the Logical Path and the physical path of /newdir as the Directory Path.

How to launch default Web browser and go to Home page using ShellExecute with http: URI scheme?

We can use ShellExecute to launch default Web browser and go to specified web page with http: URI scheme. But how can we launch default Web browser and go to Home page using ShellExecute?
I can get some information from here: https://support.microsoft.com/en-us/kb/224816 and https://msdn.microsoft.com/en-us/library/windows/apps/mt228340.aspx#browser but I still don't know how to go Home page. Very appreciate if you can provide some information
What is the default browser on Windows? Is it the registered handler of the HTTP protocol? Is it the default client registered under Clients\StartMenuInternet?
If we assume that the HTTP handler is the default browser then you can use AssocQueryString to get information about the registration:
WCHAR szBrowser[MAX_PATH];
DWORD cch = MAX_PATH;
AssocQueryString(ASSOCF_NOTRUNCATE, ASSOCSTR_EXECUTABLE, L"http", NULL, szBrowser, &cch);
As a side note, just getting the executable might not be the best option, the user could have configured it with parameters like --some-browser-option --profile c:\foo and those would be ignored. ASSOCSTR_COMMAND can retrieve the command but you need to replace %1 with a empty string.
Even if you do all of this it can still break in certain configurations. A protocol registration is not required to specify a executable, it is legal to just have a COM object. I would therefore recommend that you read the StartMenuInternet client as a fallback.
I don't think there is a standard parameter to open the homepage (unlike ? for search), you just have to hope that starting the browser without a URL will open the homepage(s).

corss domain issue in getting cljs repl working

I am trying to get the cljs repl working. However I get the following error in chrome's js console-
Unsafe JavaScript attempt to access frame with URL http://0.0.0.0:3000/ from frame with URL http://localhost:9000/repl? ....... Domains, protocols and ports must match.
I am serving the app in the clj repl using (ring.util.serve/serve app). This opens up a browser on http://0.0.0.0:3000
How do I resolve the cross domain issue ?
In this context 0.0.0.0 is a special address that when passed to a socket bind implies that you want to listen on all addresses present on the machine.
To fix your problem you should be ok if you open the browser using the URL http://localhost:3000 then the javascript and the frame hosting it will be in the same domain

Coldfusion 8: Firefox can't establish a connection to the server at 127.0.0.1:8500

I installed Coldfusion 8 trial version on my system (XP Professional sp3).
I created an Folder in the “C:/Coldfusion8/wwwroot” called “buildProject” containing an Index.cfm and some other .cfm files.
But I am unable to access the Neither my project files or CFIDE/Administrator
I tried the following URLS
http://localhost:8500/wwwroot/buildProject/
http://localhost:8500/CFIDE/administrator/index.cfm
http:// 127.0.0.1:8500/wwwroot/buildProject/
http:// 127.0.0.1:8500/CFIDE/administrator/index.cfm
http://localhost /wwwroot/buildProject/index.cfm
http://localhost /CFIDE/administrator/index.cfm
http://localhost /wwwroot/buildProject/
http://localhost /CFIDE/administrator/index.cfm
Firefox can't establish a connection to the server at 127.0.0.1:8500.
* The site could be temporarily unavailable or too busy. Try again in a few
moments.
* If you are unable to load any pages, check your computer's network
connection.
* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.
• I cleared the browsing “History” from both IE and FF.
• I have restarted the CF server in the Control Panel >Administrative Tools > Services
• Even restarted the IIS
Getting the same error.
Further I was trying to access IE/FF via CFbuilder But still I am getting the error
“The connection was refused when attempting to contact [URL].”
If you connected Coldfusion to IIS, then you probably need to connect on port 80. Which you did try, but if you connected Coldfusion to IIS, then the document root is IIS's document root, not the document root you created your new directory in.
I believe the document root for IIS on XP is c:\inetpub\wwwroot.
So, try putting a test.cfm file in there that just contains "hello world" or something, and see if you can request it from there.
Hopefully you installed IIS first and were happy it was working before installing CF.
Try connecting to your IIS on http://localhost
You should get the default IIS .htm landing page , probably index.html or something, so at least you know IIS is working fine.
If you then try http://localhost/nosuchpage.htm you will see a 403 error (as long as you didnt specify to allow directory browsing). In the standard IIS error page you should be able to see
Physical Path D:\inetpub\wwwroot
or wherever IIS thinks your web root is. When you then install CF to use IIS (rather than standalone) it will use this path as your web root.
Rename your index.html file as index.cfm and connect to it on
http://localhost:8500/index.cfm
If vanilla html pages are working from the directory but .cfm pages are not then you probably need an CFIDE mapping (I think one quick workaround is simply to copy your CFIDE folder and drop it into web root).
What happens if you try typing this in as a url:
http://{your i.p. address}:8500/CFIDE/administrator/index.cfm
I bet it works