On a live IIS web server, is it possible to update the /View/xxx.cshtml razor files and have those changes reflected without rebuilding and reuploading server?
Sure - just open the file and update it or FTP a new version to the server. The views are not compiled into the DLL (unless you are using one of those Razor View Compiler add-ins). As a result, they can be modified on the fly like any other content resource (CSS, JS, images, etc)
Related
I am trying to update a web site. There are new images which are uploaded to it. The web server is Apache. The web pages are written in PHP.
But I noticed that the new images are not being loaded when the site's URL is accessed from my Windows 10 computer (and also from my Android phone). Instead, the old images are accessed, but not always. Even if I rename the images on the web server the old ones are loaded.
Even if I create a new web page which accesses one of the new jpgs, the old ones are loaded. (Like, say, mywebpage.php and mywebpage-x.php).
So mywebpage-x.php should try to load image5001.jpg but instead loads image500.jpg from mywebpage.php.
Where would I look for what I'm doing wrong?
I see that it uses HTML, CSS, and JS, but does that package with the app or does it need a server if it is a static page?
Also if a server is needed could i get away with hosting on Github pages.
Your HTML, CSS, and JS files are bundled with the app bundle and loaded from local storage. This means that your content comes from file:// (unless you have certain plugins installed that create an http server on localhost).
You'll only need a server if you need one as a backend (which you'd communicate with via XHR/Ajax).
I have a WebCenter Sites installation. Separately, I have site.js and site.css files. How can I make a WebCenter Sites template use these two files? Where do i put those files so they can be consumed?
What I've done so far is set up a simple HTTP server outside of WebCenter Sites and used <link> and <script> tags to point to those files on the external server. This does indeed work, but I prefer having the files served from the sites application.
I see sites exposes a CSS type asset, but it seems to be tied to their widget framework. I was thinking to just make an empty widget with CSS, then I could reference the widget/asset in the <link href=. Again there aren't many examples of this online.
Can anyone give me some ideas on how to serve files from within WebCenter Sites?
There are alternatives to storing files directly in the webapp, such as using a custom basic assettype to contain the files, and then delivering them via blobserver (or just rendering inline). The advantage to this is that you are managing assets to keep environments in sync, rather than updating the webapp & redeploying.
The path needs to be relative to the web application context. There are probably better ways to reference it in Sites, but the lowest-common denominator approach that will work for all J2EE web applications is to use pageContext.request.contextPath, so the link would look like:
href="${pageContext.request.contextPath}/src/stylesheets/css/styles.css"
So if this were used with a JSK, the src folder would be under [JSK_HOME]\App_Server\apache-tomcat-7.0.42\Sites\webapps\cs
I have this MVC4 web application, I run it locally at mySite.local/. I created an application in IIS 7, mapping to mySite.local/corporateSite/. I point that application to an Umbraco (CMS) installation I have locally.
This works pretty well.
I have these UI images and .css files that were in my corporate site and were linked-to by absolute urls (Examples: /css/myCss.css, /media/ui/myFunLogo.png, etc.).
Now this "/" root has changed, if I want my css and images to work, I have to use /corporateSite/cssmyCss.css... this is logical.
How can I change my configuration or sites setup or code so that I don't have to write that whenever I'm linking to a file like that. Should I use rewrite rules to prepend the application url?
How to people integrate these elements normally ? I know a lot go through subdomains, but this would not be ideal for us at the moment.
Thanks for the help!
(I think my question is related to this one how to integrate umbraco with mvc4 but in some different aspects. And the answers are not good for me.)
In umbracoSettings.config, there is a setting for "ResolveUrlsFromTextString".
Setting it to true should tell Umbraco to add the virtual directory name to links and images.
In the past I had problems with the browser cache serving older versions of the xap file.
In order to overcome this I dynamically add a query string parameter containg the last modified date of the xap file to the silverlight source parameter in aspx page. This guarentees that clients will receive the latest xap file and not a cached stale versions.
I am now using the DeploymentCatalog functionallity in MEF in a silverlight app to download some xap files.
Does anyone know how this works under the hood?
Will it use the browser cache or does it download fresh everytime?
If it does go through the browser cache, how can I prevent stale cached versions from being served? (as described above).
Thank you!
The DeploymentCatalog just uses the WebClient class to download the xap. Whether it is cached will depend on your browser. From the server-side you should be able to control whether the browser caches the file by using the HTTP Expires header. Here is a question with some information about this: Browser Caching in ASP.NET application