How to mention Expire Header and Compression for IIS 6 in web.config - asp.net-mvc-2

I need to specify the Expire Header and enable Compression for static files such as images, css and js in order to optimize my site. My web app is hosted in IIS 6 with shared server. Since, this is a shared server, so I don't have access to IIS manager. So, the only option, I have is play with "web.config".
Technologies which I am using is Asp.Net MVC 2.0.
Thanks.

Not possible in IIS 6 through Web.config, since config support for such operations were added in IIS7. Ask for assistance from your hosting service provider.

Related

Deploying a GWT web application on Github

Can a GWT web application be deployed on Github?
For example, a GWT web application is created, and it works on a server intalled with Tomcat. It's known that a web page can be created on Github, like http://help.github.com/articles/creating-pages-with-the-automatic-generator/ Can a GWT web application also be deployed on Github? If it's possible, how to deploy it?
On Github Pages you can only use/host client-side technology like JavaScript, CSS and HTML. So your app would not have an back-end which can handle your RPCs. But it's possible on GitHub Pages to make Ajax calls (http://blog.teamtreehouse.com/code-a-simple-github-api-webapp-using-jquery-ajax ) , which are also the base for GWT-RPCs.
When the fron-end is running, you need a server for your backend. Afaik there are libraries to use php as an back-end (I guess most are not maintained anymore), or you could use the JsonpRequestBuilder to make HTTP-calls to a server of your choice. JSONP would be necessary to overcome the cross-domain restrictions imposed by browsers same-origin policy, because your backend would be on a different server.
So all in all this is not the way to go. As I mentioned in the comments you can try the GAE (Google App Engine) to host your application without recreating your back-end, because the other solution would require to rewrite your back-end (eg. PHP) and to host it somewhere
One last tip: Before you move definitely to GAE, check that you have all necessary libraries for you backed.
If you are using servlets and stuff : certainly no
If you are only using client stuff, my guess is also no. I don't think github even allows javascript, or even html ?

yii2 remove backend/web and frontend/web from url

I am trying to change site url from http://localhost/yiiwebsite/backend/web/index.php url to http://localhost/yiiwebsite/admin and http://localhost/yiiwebsite/frontend/web/index.php url to http://localhost/yiiwebsite/.
Can anyone help me to do this.
It's described in official docs here.
Here is some basic info:
The application installed according to the above instructions should
work out of box with either an Apache HTTP server or an Nginx HTTP
server, on Windows, Mac OS X, or Linux running PHP 5.4 or higher. Yii
2.0 is also compatible with facebook's HHVM. However, there are some edge cases where HHVM behaves different than native PHP, so you have
to take some extra care when using HHVM.
On a production server, you may want to configure your Web server so
that the application can be accessed via the URL
http://www.example.com/index.php instead of
http://www.example.com/basic/web/index.php. Such configuration
requires pointing the document root of your Web server to the
basic/web folder. You may also want to hide index.php from the URL, as
described in the Routing and URL Creation section. In this subsection,
you'll learn how to configure your Apache or Nginx server to achieve
these goals.
By setting basic/web as the document root, you also prevent end users
from accessing your private application code and sensitive data files
that are stored in the sibling directories of basic/web. Denying
access to those other folders is a security improvement.
If your application will run in a shared hosting environment where you
do not have permission to modify its Web server configuration, you may
still adjust the structure of your application for better security.
Further configuration depends on chosen web server (Nginx / Apache), which is not even mentioned in the questoin. But both options are covered in official docs by the given link.
For shared hosting environment there is special section too.
And by the way this was asked before many times here on SO, just do a better research.

Deploy the asp.net MVC 2 web application to the IIS 7.5 getting issues

I have developed the asp.net mvc web application. whereas my macine is configured with IIS 7.5. I want to deploy my web application with source code to the IIS so that i can attache the process and debug it run time. I choose this way because few functionality , like file copy and file create not performing after simple publish.
I tried by ,
Create the web application in IIS 7.5 manager. installed ASP.NET utility. As i browsed , I got asked by to enable directory browsing.
Which i enabled. where as in IE I found file structure which definitely did not want. I expected direct my LogOn page which is configured in globle.asax after deployment.
What else i need to check. or is any step i have missing?
I am using Visul web developer 2010 express edition to develop the application.
Please guide me.

Siteminder SSO not protecting ASP.NET MVC site

I have site minder installed on IIS7 and I am running ASP.NET site on the sever. It appears that Site minder SSO fails to protect ASP.NET MVC requests. It appears that all ASP.NET requests are processed by ASP.NET isapi filter which prevent Siteminder isapi filter from running. How can I make siteminder SSO work for protect my ASP.NET MVC site? Is there a way I can force isapi filter for Siteminder SSO to be loaded before ASP isapi filter?
The solution for us was to list the SiteMinder web agent ISAPI handler followed by the MVC ISAPI handler, in that order, in your web.config file.
I posted the code fragment here.
Have you tried ordering ISAPI filters in IIS? I have not done it with Win2008 IIS7, but with Windows 2003, SiteMinder agent installer reorders the filters. You should be able to check it in IIS Manager and reorder. SiteMinder filter should be on the top.
I had the same problem on my MVC-2 site enenthough the virtual folder was protected by siteminder.
Finally figured out what the issue was.
Changed the Application Pool mode to Classic from Integrated and voila! problem solved.
We have the same problem for MVC3 on IIS7 and we need to use Integrated Mode. Our solution is to use combination IHttpModule and Handler (.axd) but it is now uncessary since the new version of siteminder has IIS7WebAgent.dll which is a integrated MODULE instead of ISAPI filter (ISAPI6WebAgent.dll). I tested this and confirmed its working, it was able to protect all our MVC url and we can also read HTTP Header created by siteminder such as SM_USER from the MVC pipeline.
The siteminder version I tested is R12 SP 3. If your planning to use IIS7WebAgent.dll, you need to remove all occurances of ISAPI6WebAgent.dll on "Handler Mappings", "ISAPI & CGI Restrictions" and "ISAPI Filter" on IIS to make sure its not complicting.

Why is my ASP.net MVC site not serving pages on Windows Server 2008?

Why is my ASP.net MVC site not serving pages on Windows Server 2008? The website is running under an application pool that has the .net framework 4.0 in integrated mode. It serves .htm files with no problem. However, when I try to view any of the MVC pages I get a page saying "Internet Explorer cannot display the webpage." How can I troubleshoot this?
Server 2008 with IIS 7 you need to look at the website in question and go to the HandlerMappings settings. You need to make sure that the .Net mappings are set to enabled.
I found out what the problem was. This was a pain to track down. The server hosts 2 websites. The HTTPS bindings were not associated with the IP address for the website. Instead, the IP binding was set to "All unassigned".
The solution was to associate the HTTPS binding with the website's IP address.