I made an empty project in vs 2015 with a basic component, but can't get it to work using IIS, I always get a blank page.
I am NOT using bower since I don't like it . I used vs's NPM to import all the files.
So, here is my setup in an image.
in my IIS I just right clicked the folder and set -> Convert to application, used the default integrated app pool as usual, and in the project I set it to use my IIS. The links works fine, if I type some text in the body it works.
What could be wrong?
I believe you will have issues with your structure. Most elements try to load Polymer in a link tag at the top of the component definition file ( tag-name.html) . Polymer expects every component to be within its own directory, as well as having the same parent. That being said, you could alter every file to look in the right location after downloading them all, or place all components, and the polymer library itself, into their own folders. A brief example:
App/
Scripts/
Polymer/
CustomComponent/
paper-material/ <-- downloaded paper component
This should allow you to not get 404s and multiple downloads of identical files.
The next issue is that you are using the Polymer 1.0 library but implementing it in the 0.5 API. Translating your element to 1.0 (including the conversion of elements into folders) would result in the following:
<link rel="import" href="../polymer/polymer.html">
<dom-module id="ad-nav" noscript>
<template>
<h1>Test</h1>
<template>
</dom-module>
This should straighten everything out.
I think the problem is you clicked "Convert to Application" in IIS. For regular HTML and JavaScript you do not need to click that option. Don't do that and it will work. Clicking "Convert to Application" in IIS assumes you want a .Net Application, not a plain JavaScript and HTML application. This changes file and folder permissions which caused your issue.
Related
Below script reference getting cke js from server
<script src="//cdn.ckeditor.com/4.5.0/standard-all/ckeditor.js"></script>
When I download from this server and add manually my project CKEditor not shown.
what is the difference two situation?
You've downloaded only one file "ckeditor.js" but it tries to load many other files (images, css, language files, dialogs, ...) so it can't work that way.
You should download instead the full package that you can deploy to your server: http://ckeditor.com/download
I am publishing my Web App using the VS2013 publish mechanism. For some reason it has just started corrupting the js and css filenames. e.g.
From
<link href="/Content/bootstrap.css" rel="stylesheet"/>
To
<link href="/Content/css?v=puREEettBuwGkRK7y27hOQwXg4qvcAYRnG8wxc0gvnU1" rel="stylesheet"/>
This is only happening on publish to the live site. It works fine on publish to the localhost site. It looks like possibly some kind of versioning.
The defined bundles in BundleConfig are not being expanded, instead parsed with the above result.
Any ideas? I have not seen it before and its not showing up on Google searches. Thanks for any suggestions.
ANSWER:
For anyone else getting this problem - Once I realised it was the Bundles I found this which gave a lots of thoughts. However my specific issue was that I had installed Select2 via NuGet which had added a css directory in Content. As I was creating a Bundle pointing at Content\css these clashed. I removed the css directory and republished. Still didn't work. But when I removed that directory on the server manually it all started working again.
I have included the CDN of the bootstrap CSS in my project. Everything works absolutely fine, except when I type
<div class="
Then Visual Studio pops up an error saying:
Unable to edit
'http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css'.
here`The style sheet must be part of the current project and the project must be a Web Site or Web Application project
I can hit OK to dismiss these errors, and then everything works fine as well - it reads the CSS classes and populates Intellisense and works correctly when I build. But why is Visual Studio trying to edit the remote CSS file? How can I tell it not to?
I was having the same problem and a little search brought me to the following page:
http://forums.asp.net/t/1586914.aspx?Unable+to+edit+CSS+file+
In a nutshell: Add a fake parameter to the end of your CDN URL to get rid of your errors. This also makes intellisense work correctly.
Example:
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css?parameter=1" rel="stylesheet">
I created a new TypeScirpt project, added the json file to the solution, changed the 'Copy to Output directory' property to Copy always.
When I F5 the project, the browser complains that it cannot find the resource somedata.json
If I run the python SimpleHTTPServer, load up the same html file, it works.
<script type="text/javascript">
d3.json("somedata.json", draw);
</script>
Thank you.
Have you tried using the full path from the root of the site to obtain the somedata.json file?
d3.json("/scripts/somedata.json", draw);
Replace /scripts/ with the correct path in your instance, but start the address with a leading / to make it relative to the root.
This may be related to MIME types that the server used by Visual Studio is allowed to serve. You can define such MIME types at web.config btw if this is an ASP.net project.
Also see this official example in case it helps:
http://www.typescriptlang.org/Samples#D3
Have you tried to run the project using ASP.NET Development Server?
I'm starting my first PhoneGap project and am developing using Visual Studio and Windows Phone 7, although I intend on ultimately deploying to iOS and Symbian as well.
However, I'm stuck at Step 1. I have added an image to the www/images folder, and put the following code:
<img src="images/login-btn.png" width="103" height="42" style="margin-left:90px;" />
And I get:
It works fine when I preview it in IE9, but I don't have a Mac to test it on iOS yet.
It's worth noting that the JS files and CSS have loaded fine, it's just any image (whether referenced in CSS or an <img> tag) always comes up broken.
My guess would be the Build Action of your image file is incorrect.
According to http://wiki.phonegap.com/w/page/48672055/Getting%20Started%20with%20PhoneGap%20Windows%20Phone%207#4Reviewtheprojectstructure section 4. You should be setting the Build Action of your images etc to Content which simply copies them into the output project when it is built. They are probably currently set to Resource or None.
To change the Build Action right click a file and choose properties to go to the properties window if you do not already have it open. It is probably then the first property. Just click and choose the correct one.
I'm posting this to questions that I found while trying to find my answer to the same problem. The JS framework I use adds a url query to each image when in a debugging mode (in order to force browsers to reload image, instead of using cached). So, my image "image/background.jpg" would be accessed as "image/background.jpg?d=34342233". But, when running on PhoneGAP for Windows Phone, it won't recognize the image, and thus it shows up as broken. So, I had to turn off debugging for the framework I use, and suddenly the images showed up (still, don't forget to set the Build Action to "Content" as mentioned earlier).