I have created a small site, on IIS express all is working fine. I have created on IIS new application and deployed the package to the folder. the server side is asp.net webapi. the bundle configuration is loading fine when i try to enter the home page, how ever the java script files which are referenced on the cshtml page cannot be found
<script src="~/Client/lib/require/require.js" data-main="../../Client/app/requireConfig"></script>
i am getting -
require.js
/Client/lib/require --> 404 cannot be found
and the bundle which works
viewingPanelDirective.js
/NGWeb/Client/app/appComponents/viewingPanel
how can I over come it?
I think i know what might be the cause, i had the same problem myself
in you visualstudio, the js file was running on a url like this
http://localhost:/client/lib/require/require.js
now you published it, and added it as an application to your default site, you would have given it an alias (e.g) "testsite"
meaning that in reality the file is hosted at
http://localhost/testsite/client/lib/require.js
but in reality your site is looking for it (because of the ~) at
http://localhost/client/lib etc etc
Edit in response to comment:
rather than removing the ~ (which you will need to navigate you back to the url root), i would rather just include your app name in the bundles virtual path, like this:
bundles.Add(new styleBundle("~/yourAppName/Content/css")) ....... etc
I also came across this post, I haven't tried it myself but it seems an interesting alternative to my method.
Fixing Relative CSS Paths when using .NET MVC 4 Bundling
Related
I used apidocjs to setup the documentation of my asp.net web api app. Everything works fine on my machine when I run my web api in visual studio but not on the server I deployed the app to.
I get a 404 error when I navigate to the index.html generated by apidocjs.
I think it's an issue with IIS.
I need suggestions on how to resolve this?
Ok. Found the problem kind of silly.
I did not include the ~ symbol as part of the path in my anchor tag.
Before I had
I added ~
<li>Docs</li>
<li>Docs</li>
and problem solved!!!
Update.
What I did earlier solved the problem on the deployment i did to my local IIS but not on my remote server.
I had move my static html file into the Content folder of my web-api, edited the link to look like this and the problem was resolved.
Docs
Got this from here. Ordinary html links in mvc razor
I'm using Joomla 2.5 and the backend is not shown correctly. It seems that the template is not loaded correctly.
This is my page:
http://www.fussball.tsg-kastel.de/administrator/
The page as such is shown correctly but as you see, the backend isn't...
Try doing this:
Rename the admin templates folder on the host server (for a backup)
FTP transfer of an admin template folder from another Joomla site and then copy it from the FTP location using a file manager into the admin templates folder.
You could have a corrupt file or just missing some files from installation. This has happened to people before and by doing these two steps it seemed to solve their issue.
Hope this works out for you.
You probably have a fatal error. Go to configuration.php and change error reporting to development. This will render the error to the browser (alternatively check your apache error log). I predict you probably have a plugin problem -- perhaps your host updated PHP version for example. Whatever it is, deal with that problem.
I have a website that is built with kohana and another one that is built without any framework. I would like to include the first site into the second as an application ( you can write only a report with it).
The first website it's not mine( I never used kohana) so I don't understand everything very well. Inside a folder(let's call it KOHANA) I have index.php a .htaccess file and other 3 folders:
application,
system,
modules.
I've put the kohana folder inside my website(inside the public_html folder), but nothing works...First I had an error with magic quotes, then with the log directory, the other errors ...and I kept looking for solutions and fixing the errors, but I keep getting other errors. The last one is: logsThe URI you submitted has disallowed characters. It's an old version of Kohana. How can I set-up kohana into my website without getting any new errors. I don't know if I made myself clear. Thank you.
Some specs:
IIS 7.5
ASP.Net MVC3
I have three MVC3 applications I would like to host:
Project A
Project B
Project C
I want to get the URLs to be like this, respectively:
http://domain/
http://domain/ProjectB
http://domain/ProjectC
So in IIS, I have the default website, which points to the folder for ProjectA. I then added two Applications to it, one pointing to ProjectB, and one to ProjectC, and their respective folders on the hard drive. I am storing the sites in C:\sites. Each project has a folder in C:\sites where the application's files reside. As you can see, the sites are not nested at all on the server.
When I load http://domain/ProjectB, it is trying to load configuration values from the ProjectA web.config. Obviously this is not what I want, and I'm not that awesome at server configuration. I got it working by wrapping most of the ProjectA web.config in a location tag like so:
<location path="." inheritInChildApplications="false" >
<!-- Lots of web.config stuff for ProjectA -->
</location>
I'm not really a fan of this, it feels wrong. To me, it seems like a nested Application in my site in IIS should not even know about the parent site. What am I doing wrong? I'm sure it is something really small. I would have made ProjectA an Application, but I don't want the alias on it, as I want http://domain/ to pull it up for the users.
Again, I am not that knowledgeable about server stuff, it just isn't fun to me, hence why I'm asking y'all!
Thanks!
That is how it works. By default, asp.net applications inherit their parents web.config, and you either need to override those values in your lower web.config or wrap it in an inheritInChildApplications="false" attribute like you did above.
One possible option is if you can make your home page at the root of the site NOT an asp.net application. If you can't, you're stuck doing this.
on goDaddy you can create iis virtual directories with "set application root", which then makes each director with "set application root" set act as a root directory (just as you want). The user don't notice anything. So you could look and see if you have that option?
I am just a beginner in code igniter. I have just downloaded the code igniter framework. But i don't know that where should i keep my html, php files and stylesheets, images etc. Is there any procedure to do the things? Please guide me.
CodeIgniter has an awesome user guide that will come with the install you can read through (or read it online at - http://codeigniter.com/user_guide/ ), or you can watch some of the videos on their site - http://codeigniter.com/tutorials/
In comparison to most other frameworks you're going to find they have maybe the smallest learning curve and great documentation. I would also recommend learning basic PHP and getting familiar with your web environment maybe before beginning.
I used these tutorials to help get me started with the framework haven't look back since! http://net.tutsplus.com/sessions/codeigniter-from-scratch/
hi I am a weekend coder and picked up CI about a year ago.
It helped me a lot.
The best tutorial I found was on the IBM's developer site. It runs through putting together a simple application. Admittedly, there's nothing in it about directory and file placement but it helps cement ideas about how models, views and controllers (MVC), and why MVC is so helpful. Because the basic idea is quite simple, it's worth running through a simple CI tutorial again and again till you 'feel' or intuit the basic helpfulness of the setup.
Things like JS, CSS files can be kept in their own folders at the first level of your website folder e.g /js or /css or /images. You ask about PHP files as well. PHP files which you, the coder, write, are either 'views', 'models' or 'controllers'. These go in the folders with those names in the /application folder e.g /application/views/yourview.php or /application/controllers/yourcontroller.php. The CI install comes with a default view file and a default controller, which you are probably already aware of.
The files inside /application/config are important as well. Read the user-guide about tweaking these files. The most obvious tweaks are to database.php to connect to your db, autoload to give automatic use of CI helpers/libraries which you can choose, and to config.php to give CI the name of your website e.g the name you give to '/'.
The file 'index.php' comes with the CI installation (/index.php). You don't need to fiddle with it at all really except to determine the level of error reporting you want ('environment') and that's not a priority at all. But it's important to remember this about index.php - that CI uses it as the essential reference for defining paths to useful folders like CSS or images. So even if your view file is in /application/views, if it refers to an image like a logo.gif in /images for example, the path to it is just /images/logo.gif. It is not anything more complicated like ../../images/logo.gif.
I hope that helps.
Tom
Offline version of CodeIgniter user guide is available with CodeIgniter which already downloaded by you.
just extract your CodeIgniter zip file in your localhost server root directory,
Then http://localhost/www/CodeIgniter_2.1.2/user_guide/ open this url with browser ,here you can access offline version of CodeIgniter user guide.
Here I am using wamp server so I used this url, If you are using xampp server then please use http://localhost/CodeIgniter_2.1.2/user_guide/
Okay this is what I would usually do for code igniter
here is my directory structure.
CI App Path (e.g "c:\xampp\htdocs\ci_app_name" )
-application
-system
-assets
--css (new folder , where css files will be included)
--js (javascript and jquery libraries location)
Basic HTML and PHP files should be location
CI_app_pah
-application
--views (this is where to put HTML and PHP files)
For other things such as Controller , Models and Views , you can't put any where but put in their related area.
That will be
CI app
-application
--controllers
--models
--views