How to start/stop a website in IIS using c++ - c++

I am using IIS 7.5 in windows 7 machine.
I need to start/stop websites from my C++ application. This is a plain win32 app, nothing to do with .NET.
Now, I've found out how to configure websites, using the IAppHostAdministration interfaces as mentioned in the link https://forums.iis.net/t/1146649.aspx.
With IIS 7, my code does this:
Get the AppHostWritableAdminManager and commit the path
MACHINE/WEBROOT/APPHOST/Default Web Site/.
Call GetAdminSection with the section name appSettings.
Then look at the returned collection and creating new site using
CreateNewElement method.
But I can't find a way to start/stop those websites.
Please help me.

Related

Need Suggestion on How to get data from SharePoint Online for Windows 8.1 App

I recently working on a Windows 8.1 App, which was developed with C# and XAML. SharePoint Online is used for Data store.
I searched and found that Wictor solution can be used for Authentication. but the problem is that we can not use Wictor solution [http://www.wictorwilen.se/Post/How-to-do-active-authentication-to-Office-365-and-SharePoint-Online.aspx] directly as it is built upon .Net framework and Metro Apps are built upon .NetCore.
One possible option is to use WCF service and have whole Wictor solution in WCF service then call WCF service from Windows App. I tested it and it is working fine.
However, I wanted to know what would be the best approach available if I don't want to deploy this WCF separately. In future I have to publish this Win App on Windows store.
Any help will be appreciated.
Thanks

Setting up RoadKill

I am trying to setup a internal wiki site for project documentation project. I am using roadkill because I have a IIS server and a .net environment.
So the installation instructions aren't much. Unzip the files onto a site directory. Navigate to http://arwiki
Should be that simple, however, I get an error about directory browsing and it looks like there is no MVC mapping in Global.asax. It points to a internal dll so it is hard to determine what I did wrong?
Has anyone setup Roadkill and know what I did incorrectly?
Also there is no tag for roadkill
You can ask for help on the issues board -
https://bitbucket.org/yetanotherchris/roadkill/issues?status=new&status=open
However I can tell you that the problem is most likely that you don't have MVC installed on IIS (if it's Windows Server 2008). You might also need to enable ISAPI filters, they can be turned off.
The ASP.NET web installer contains the MVC bits you need, although Roadkill does come bundled with these.

coldfusion web-inf\web.xml purpose

Im looking at using New Relic for monitoring our coldfusion sites. however it uses the web application display name defined in web.xml to define applications in its admin.
As far as I can work out coldfusion only have the one web.xml file in:
...\ColdFusion9\wwwroot\WEB-INF\web.xml
What is the purpose of this file? and can elements of it be overwritten on a site by site basis?
It looks like New Relic is a tool for monitoring Java (and other) apps. ColdFusion is a Java application. And the way you have it installed (standard) it is a single application with a single web.xml. Regardless of how many ColdFusion sites (apps) you run on it, it is still a single web application.
If you have CF Enterprise you can set up a multi-server install where you can deploy each of your sites as a separate Java app, but the way you have it set up now, you'll probably only be able to monitor CF as a whole vs each individual site.

How to get information when is connected to web site?

I want to set focus to search form on site http://www.filehippo.com/, and after that send some text (for example some application name what want to download).
But before that need to be shore if computer is connected to site. So now my question is how to implement some kind of listener who will wait for specific ip address of site, and after computer is connected get back information?
Only problem is that I develop in visual studio c++ and searching answer for those language, know that c++ is not best solution for task's like that but this is just one part of application and at now don't have time to study other language.
Os: WIN 7, 64, Visual studio 2010 c++
I am using WinINet API in order to access web services (HTTP POST) and download files hosted on web server (HTTP GET). It contains functions to connect to specific web site (e.g. InternetConnect), send and receive requests etc. so you might find it useful.

Glassfish, railo and coldbox - messed up links?

I am new to ColdFusion and ColdBox (and programming). I tried to setup ColdBox but some of the links in the sample applications are broken.
My configuration is a GlassFish v3 installation with the current Railo OSS. I access my site through Apache 2.2.14.
So instead of http://127.0.0.1:8080/railo/ I access my environment trough http://railo/.
In Railo I have a webroot mapping / to C:/webapps/myproject/.
I have copied the current ColdBox 3M4 to C:/webapps/myproject/coldbox. I can access the dashboard through http://railo/coldbox/dashboard/index.cfm and have access to all options.
My problems start the moment I try to open the sample gallery:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
java.io.FileNotFoundException: C:\webapps\viss-dev\coldbox\samples
(Zugriff verweigert)
note The full stack traces of the exception and its root causes are
available in the GlassFish v3 logs.
GlassFish v3
OK, no problem, just enter the link directly: http://railo/coldbox/samples/index.cfm.
The site looks plain, who cares - BUT all local links look like this: http://127.0.0.1:8080/coldbox/samples/applications/helloworld/index.cfm (railo is replaced with 127.0.0.1:8080).
Looks like trouble. To make my confusion perfect: when I try to access the login app: http://railo/coldbox/samples/applications/sampleloginapp/index.cfm and hit the submit button, I am redirected to this address: http://railo/railo/coldbox/samples/applications/sampleloginapp/index.cfm.
I believe that this is not really ColdBox-related, but it manifests itself when I try to use ColdBox, so here I am.
P.S.: amazon.de takes too long to ship the ColdBox book :(
Here's a suggestion, The good people at Vivotech have developed a couple of different installers for both Windows/IIS7 and various flavours of Linux for both Railo and Open BlueDragon. The setup installs Tomcat, Railo/Open Blue Dragon and the necessary connectors to the web server. Here's the link: http://www.viviotech.net/company/installers.cfm
I think you'll find using the installers to be a lot easier than working through it yourself. If you want to go that route, Adobe and various bloggers have instructions on how to do it. Matt Woodward has a very good blog posting on it: see MattWoodward.com, He also has a presentation on this, you can see it here.
hth,
larry
Since you are new to ColdFusion (and programming in general), I would recommend developing against Adobe ColdFusion. The Developer Edition of ColdFusion is free and available from Adobe.com. You won't need to mess around or configure GlassFish since Adobe ColdFusion comes with a baked-in pre-configured Tomcat, providing both servlet engine and web server.
Just install the 'Stand-alone' version of ColdFusion Developer Edition, copy the ColdBox files into the webroot and in less than 15 minutes you be up and running.
You should also check out ColdFusion Builder which is currently available in beta from http://labs.adobe.com. It has full language support and integrated help content for learning the ins-outs of the language.
As far as the ColdBox book goes, it's available as an eBook if you really can't wait. ;-)
DISCLAIMER: I spend about 50% of my waking life devoted to making ColdFusion better as the CF Product Manager at Adobe. :-)
i have given up on glassfish and i am now struggling with tomcat :D