How to Deploy ASP.NET web application using InstallAware - installaware

I have a ASP.NET web application.
Now I want to create a installer using InstallAware so that my customers just click on the installer and it will be put on the web server as well as configure IIS for the web application
Is there any one who can instruct me how to do it? This is the first time I am using InstallAware
Thanks in advance,
Mohin

If you have access to InstallAware's MSICode, you can use the following code:
In the Define Setup Globals Section:
Get Folder Location WWW->WWWRoot into WWWROOTDIR
In the Perform First Time Install section, just before calling Apply Install:
Install Files D:\Projects\mywebsite\Release\*.* to $WWWROOTDIR$\mywebsite, include subfolders
In your Perform First Time Install section, after Apply Install is done:
if Variable SUCCESS not Equals ERROR
if Variable SUCCESS not Equals CANCEL
Get IIS Index for Site "Default Web Site" into DEFAULTWEBSITEINDEXVAR
Create Virtual Folder "mywebsite" in IIS Site #$DEFAULTWEBSITEINDEXVAR$, pointing to physical location $WWWROOTDIR$\mywebsite
Get System Setting IIS Anonymous User Account into INETUSR
Set Read Permissions on File System Object "$WWWROOTDIR$\mywebsite" for Current User Authenticated Users $INETUSR$
end
end
If you do not have access to MSICode, this is still easy to do using the InstallAware Designer.
Go to Server Configuration > IIS Sites
Create a Virtual Directory under "Default Web Site"
Make sure you choose the correct ASP.NET version, and that Default.aspx is on top of the Documents tab file listing.
Enable appropriate Directory Security settings
The rest of the settings can stay default
Go to Setup Architecture > Files
In the directory list below, if $WWWROOTDIR does not exist, create it by Right-clicking on "Target Folders" and choosing "Add System Folder", "WWW->WWWRootDir"
Create a sub-folder under that with the name of your virtual directory
Add all files you need for your ASP.NET application here - you can use wildcards too
This should be enough to have InstallAware setup the IIS website and your application.
If you have common Assemblies, you can directly install them into the GAC by adding them in the Setup Architecture > Assemblies page. The additional advantage is that you can choose to have ngen run on them.

Related

Permission Issue for laravel APP QUEUE in windows server 2012

We have a laravel app (Version 5.5*) deployed in WIndows Server 2012 R2. But our development stack is LEMP. Same codebase works fine in development STACK but fails in WINDOWS SERVER.
Problem:
In our App, there is a REPORT DOWNLOAD queueable job which reads data from database table and generates an excel file using box/spout package(version 2.7) depending on user input date range (daily,weekly,monthly, etc) .
When running the queue:work command from cmd as administrator,
$writer->openToFile(‘path/to/file’) throws an error : failed to open stream : no such file or directory.
See this image for code snippet throwing error
Solutions I tried:
Setting right permissions(full control Read & write) for Storage folder of my project (For Users, IIS_IUSRS,IUSR)
Setting right permissions(full control Read & write) for C:windows\Temp folder (For Users, IIS_IUSRS,IUSR)
Created symlink for storage folder inside public
FYI:
OS: windows server 2012 r2
PHP: 7.2*
Laravel: 5.5.*
box/Spout package: 2.7.*
** AT LAST GOT THE SOLUTION AFTER GOING THROUGH ANSWERS OF OTHER QUESTIONS RELATED TO THIS PROBLEM **
You can follow the following procedure:
Go to IIS Manager
Select your desired project (For example: myexampledomain.com) listed under Sites
Go to Security tab and you'll see the users listed with their permissions on the folder.
Now, click Edit button to go to a new window and click Add. In the text box,type IIS AppPool\MyApplicationPoolName.In our example it should be IIS AppPool\myexampledomain.com.
Click Check Name and you'll see the test change with underline.
Click Ok. Add the appropriate permission(Modify,read,write) to the newly created user.
That's it!!!
Thanks to all for responding.

Setup TYPO3 for development on Windows (Apache + OpenSSL)

Setting up TYPO3 on Windows using an Apache server poses some problems I've noticed. Solutions are sporadic and/or incomplete in many instances.
There are the requirements, not being able to connect to the backend, openssl not working and a few more.
So, how to setup TYPO3 on a Windows machine for development?
This answer was made with:
Windows 8.1
Ampps (Apache/MySQL)
GraphicMagick
Setting up Typo3 on a Windows machine using a local server
Apache & MySQL
Make sure you have a local server with Apache and MySQL, such as WAMP, XAMPP, Ampps or another.
Settings this up we'll call the "project" we're going to start: typotest
Create a folder in the "www" or "wwwroot" of your Apache server called "typotest"
Create a virtual domain for your project, in Ampps go to localhost/ampps/index.php?act=ampps_domainmanage (Make sure the server is up and running first!), called "typotest". This will make your project accessible through http:// typotest/ (remove space)
On your machine, go to `C:\Windows\System32\drivers\etc\` and open the "hosts" file in the folder with administrator. Add a record at the bottom: `127.0.0.1 typotest`. Save it and make sure it's there.
Open the Apache `httpd.conf` file in C:\Program Files (x86)\Ampps\apache\conf
Make sure the following lines are **not** commented in the file (remove `#`)
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule ssl_module modules/mod_ssl.so
At the bottom of the file, add the following code
<IfModule mpm_winnt_module>
ThreadStackSize 8388608
</IfModule>
Save the file
Open the `php.ini` file in `C:\Program Files (x86)\Ampps\php` and make sure the following lines aren't commented (remove ';')
extension=php_fileinfo.dll
extension=php_openssl.dll
//edit these lines to be the same
post_max_size = 32M
max_execution_time = 240
We're done with Apache.
OpenSSL
Go to here, or if the link is still active, straight here. Download the most recent 32-bit release of OpenSSL for Windows. I used 2 installations, not sure which one was the correct one.
Visual C++ 2008 Redistrubutable 1.7MB installer (Description: Having problems with error messages when trying to run OpenSSL? This will likely fix the problem. Only works with Windows 2000 and later. Although there is a "newer version" of this installer, this is the correct version to install.)
Win32 OpenSSL v1.0.1j (Description: Installs Win32 OpenSSL v1.0.1j (Recommended for software developers by the creators of OpenSSL). Note that this is a default build of OpenSSL and is subject to local and state laws. More information can be found in the legal agreement of the installation.)
That should take care of having OpenSSL installed on your Windows machine.
Additional software
By default, Typo3 cannot handle images out of the box. For it to be able to handle these you need to install GraphicMagick and a setting needs to be modified. The setting we'll get to later during the configuration of Typo3 itself.
The software you'll need is this, download the latest version of GraphicMagick. Get the version that's right for your system (and preferably corresponds to your server). You have the choice between 32/64bit, obviously, but also Q8 and Q16, these correspond to image quality (higher is better).
Windows
To setup Windows to have globally usable variables we need to add them to the system settings. I again used two methods and it might be a question of either/or.
Go to "System" (Windows key + Pause/Break key) (Control Panel/System)
Select on the left: "Advanced system settings"
Go to tab: "advanced"
Hit button: "Environment variables..."
Click "New..." to add a new variable
Name this new variable: "OPENSSL_CONF"
Remember, I used Ampps, so the Variable Value for me is: `C:\Program Files (x86)\Ampps\apache\conf\openssl.cnf` -> Press "OK"
Scroll down in the variables list and select variable: "Path"
Click "Edit..."
Behind the existing variable add: `;C:\Program Files (x86)\Ampps\apache\bin` (including the semicolon at the front!!!)
Save it
Reboot Windows at this time
PHPMyAdmin
Open PHPMyAdmin and create a new database named "typotest". Also create a user for this database with the same name and password. (This is for convenience's sake of this setup, these 3 are ideally different and this practice should never happen on a production environment!)
Typo3 Installation
Download Typo3, I've used v6.2.6. Extract it to the earlier created folder in the "www" or "wwwroot" folder of your local server. Next:
Create a file in the "/www/typotest" or "/wwwroot/typotest" called "FIRST_INSTALL", no extension for this file.
Now start the installation by going to `typotest/typo3/install` in a browser.
Follow the 5 steps of the installation, entering values created above where necessary
**Stop** before you log into the backend!
Open the file `/www/typotest/typo3conf/LocalConfiguration.php` in an editor
Search for the following variables and edit to settings below:
'loginSecurityLevel' => 'normal'
'devIPmask' => '*'
'displayErrors' => 2
Now refresh the login page and login.
In the left menu go to "Install" and select the "Unlock the Install Tool" button
Enter password and continue
Go to "All configuration"
Select "Toggle all" below
Search for "rsa"
Where it says: "[BE][loginSecurityLevel] = rsa" change "rsa" to "normal" in the inputfield below.
Modify [FE][activateContentAdapter] = 1 //This enables the viewing of images [source](http://stackoverflow.com/questions/25265924/typo3-distribution-png-issue-when-posting-images)
Modify [GFX][im_path] to the path of your GraphicMagick installation (e.g.: C:\Program Files\GraphicsMagick\ )
Modify [GFX][im_path_lzw] to the path of your GraphicMagick installation (e.g.: C:\Program Files\GraphicsMagick\ )
Modify [GFX][im_version_5] to "gm" (short for GraphicMagick)
Choose "Write configuration" at the bottom of the page. This saves this setting from becoming reset to default "rsa" for BackEnd ([BE]) login. (Make sure to change this back when going to production!)
This might not help everyone out there but it's all the stuff I had to change to get Typo3 to work and it might help a few future souls that have the same or similar troubles.

Debugging with VS other than localhost

I want to debug my application by VS but when the application should run, it should have url like: http:localtesting.com instead of localhost. I already have localtesting.com in my host file so directly putting that url in my browser opens my IIS default directory page. How can I make my VS to run on that url while debugging? Where should I put that url?
Edit:
Putting the url in custom web server textbox and running the solution I am getting :
Set it to "Use Custom Web Server" and put your URL into that box.
Edit: 'The unable to debug..' error message is probably a separate issue. Can you debug a brand new site that you can create just to test?
A few things can cause that error. For example, the URL Rewrite module: Unable to start debugging on the web server. Could not start ASP.NET debugging VS 2010, II7, Win 7 x64
As #SteveHobbs said, set it to "Use Custom Web Server and put your URL into that box. Just underneath that section, there should be another section labelled "Debuggers".
Put a tick into the checkbox next to ASP.NET and save the properties.
When you want to debug, go to the debug menu within VS and choose "Attach to Process...".
If you are using IIS, look for the process called 'w3wp.exe' and choose that. After a bit of crunching, perform whatever actions you need on your web app and you will see the debugger land on your breakpoints and so on.

Publishing an IIS web application to a website root?

I'm trying to import a web application into IIS7 using Web Deploy. I packaged it into a ZIP file using Visual Studio's "Publish Web" functionality, and when I select the zip I get to my "Application Package Information" screen.
One of the settings it asks me for is "Application Path". If I leave that empty (so it basically just says "My Website/"), and try to continue, IIS gives me the message:
This application will be installed into "My Website". Most applications are usually installed into a folder beneath the root, such as "My Website/Blog". Are you sure?
I can't understand why it gives this warning. I'm tempted just to say "OK" to this dialog, but I wanted to check first - is there something obvious I'm doing wrong? Surely if I want my web application to be the entire web site, I want to install it to the root or otherwise users will always have to access http://host/MyAppDirectory/ instead of just http://host/ - why would I want to have the unnecessary suffix MyAppDirectory/? Is it better practice to install the application to MyAppDirectory and somehow map that directory to the website root, or is it OK just to install the application to the website root despite the warning?
In addition, assuming it is OK to install the application to the website root despite the warning, is there a way to completely remove the "Application Path" setting (and the related warning) from the "Application Package Information" screen, and always assume that the app should be installed to the website root?
If it's your primary web app, then it's fine to ignore this message. It seems that a lot of people like to run completely separate applications for their site so there will be http://domain.tld/forum/, http://domain.tld/blog/, http://domain.tld/something_else/, and also http://domain.tld/ and each will be a separate web app.
I don't know how to disable this warning, but I'm rather certain you know what you're doing to the point you can ignore it.
Personally, if I'm going to run web apps under the same site, say /blog, /forum, and / I'll have a file system layout like the following:
/var/www/blog || C:\Sites\Blog
/var/www/forum || C:\Sites\Forum
/var/www/site || C:\Sites\Site
In that case, I'd get the same message for publishing to each and every one.
You seem to know what you want to achieve as your end goal so I'm inclined to suggest you ignore that message. Hope that helps.

Debugging Silverlight project with Visual Studio loads file not local webserver?

I've got a Silverlight project in VS 2010 that when I go to debug, my browser is spawned, but the file:// location is attempted, rather than loading the http://localhost location.
How can this be fixed?
Thanks.
-- Update --
The specific error is as follows:
The provided URI scheme 'file' is
invalid; expected 'http'. Parameter
name: via
The error makes sense, but the reason why it's trying to load up file: rather than spawn the local server is the issue.
First, you'll need to have a web project to host the silverlight app.
Second, edit your web application properties (select the project then press ALT + Enter) and add a reference to your silverlight application in the "Silverlight" tab. Now whenever you build your applications, a copy of the silverlight app will be copied to the web application.
After that, create a test page with some HTML and add an object tag with the url to the silverlight xap file.
Also, make sure your web application is set as the default startup application.

Resources