General Description :
I have installed JuiceUI on a local build of a web form application in asp.net in Visual Studio 2010. What I want to do is take this application and add it to a virtual directory that has been setup for me. I have JuiceUI working on my local version, but it does not load the AJAX (such as the datepicker [i.e. calendar]) on the virtual directory.
Any help to get this loaded onto the virtual directory would be very much appreciated.
Details I know to give at the moment :
This is a web form application. To deploy to the virtual directory, I copy and paste the directory of my code into the directory space on the server. Therefore my bin folders and jquery are loaded on my app folder. I have configured the parent website web.config membership provider so that I can connect and access my app.
So I have had my page working just fine on the virtual directory. I installed JuiceUI on my local build and was now copying it to the website to realize that none of the ajax functionality was working.
I'd say the first step is to verify that the browser is loading the necessary js and css files. Use chrome inspector or firefox+firebug and look for any 404s on the resources. If the scripts and css aren't loading, then you'll need to adjust their location in code to match your setup.
Related
I just checked out my "mixed" (asp classic and .Net) web site source from SVN on a new Windows 2019 Server. When I go to the logon page (.asp classic), it's fine but when you logon and call the main page (.aspx) it throws the error: "Could not load type 'CADE.main.index'" and displays:
Line 1: <%# Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="CADE.main.index" %>
This SVN code is running on 15+ servers, including one 2019 Server. The code behind looks like:
namespace CADE.main
{
public partial class index : BasePage // Override with BasePage
{
IIS and everything under Application Development is installed. IIS serves .asp, .txt, .gif, .png, even .Net handlers (.ashx) and web services (.asmx), just not the aspx pages.
So, I rebuilt the solution with VS2019 and published it, gave administrator permissions on the app pool, gave "Everyone" full permissions on the entire web, deleted the bin directories in both the source and web locations, ensured output path was bin/, cleaned the project, don't think I should change CodeBehind to CodeFile, and tried about every other thing that people have suggested on this web site but nothing has eliminated the error.
Question: How do I fix this error so the .aspx pages loads?
EDIT #1: 15 hours after post
I'm not sure but with this information maybe this should be a new post.
This error ONLY happens on the second web site. IIS is serving two web sites, separating them by host name (web1.com vs. web2.com) in bindings. They both point at the same file structure. Web1's subdirectories are natural while Web2's subdirectories are virtual directories that point to Web1's.
Web1: Normal IIS web
wwwroot
LMW (subweb, LMW/Main/index.aspx is page in question, but works here)
Web2: Second web in IIS, based on host name, uses Web1's folders as virtual directories.
wwwroot
WEB2 (folder under wwwroot)
LMW (virtual directory points to Web1/wwwroot/LMW. LMW/Main/index.aspx gives the error here)
Question: Why doesn't the .aspx work when it's a virtual directory?... it's the same file as is in Web 1?
EDIT #2
It is working but I don't know what I did to fix it. I'm sure I changed something but I don't know what it was. So, I created another web like web #2, New web folder under wwwroot with LMW a virtual directory pointing to Web1/wwwroot/LMW! I'm seriously missing something, Any ideas?
These errors occur if the .aspx page or the Global.asax page contains a reference to a code-behind module and if the application has not been built.
You could try the below method to build the application:
Use the C# command-line compiler (CSC.exe) to run the following command:
csc /t:library /r:System.web.dll /out:mydll.dll myfile.cs
OR
In Microsoft Visual Studio .NET, click Build on the Build menu.
Also try changing CodeBehind="index.aspx.cs" to CodeFile="index.aspx.cs". This change is required when you change project type from website to webapplication or vice versa.
make sure you install the .ne framework feature of iis.
I actually created a brand new web that used a Virtual Directory for it's codebase that is the same code as the other webs.
Index.aspx resides in the /lmw/main directory. I had created an Application on that folder when I was creating the other applications in the web. So, I removed the "Application" from /lmw/main and it worked.
I have a webshop in ASP.MVC.
The solution consists of 2 projects - a web.frontend and a web.admin.
In web.admin, file upload is possible. These files should be accessible from the web.frontend to show in browser.
I have tried tons of different C# methods to various paths...
Please provide me a way to put shared files where the browser can access them too.
I've tried placing the files at the .sln root - but the browser gives me an error: Not allowed to load local resource.
So somehow, the files should be placed in the web.frontend wwwroot? from the web.admin project?
Your only choice here is using virtual directories. In full IIS, that's a pretty straight-forward affair. You simply add a virtual directory to the site in IIS and point it to the location on the filesystem to where these files are stored. Then, you reference the files using this virtual directory in your HTML. For example:
Foo
The same is required in development, but the procedure is a bit more circuitous with IIS Express, since there's no GUI management. To add a virtual directory to your project in IIS Express, you'll need to go to File > New > Web Site... in Visual Studio. Click the Browse... button, and then click on the Local IIS tab. Select the site for your project, and then click the icon at the top-right that looks like a yellow folder with a red asterisk. Type an alias name (this is what you'll use in your HTML) and then browse to the location of your files on the filesystem. Uncheck Create IIS application and then click OK. Then, click Cancel and Cancel again. You're not actually going to create a new website; it's just the only way to get to this area where you can add virtual directories. Rinse and repeat with your other project.
I have a VPS (Cloud Server) and I have Visual Studio, IIS, SQL... all those nice things installed. I am also sometimes doing development on this VPS.
This website is basically a simple file manager. When it loads, it lists files and folders that resides in the App_Data folder. This said, I am using the App_Data as my "root/home/topmost-directory" for the file manager.
The reason I am putting them in the App_Data folder is because I don't want users to just go like this: www.mywebsite.com/ROOT/[gets a list of files].
Instead, if they try to go: www.mywebsite.com/App_Data/[tries to get list], IIS will block them with a nice error (because IIS blocks access to that folder).
So, the website accesses the structure in the App_Data folder via code behind. This is how the website navigates. It can download, upload, move files around, rename... delete... everything right to/inside the App_Data folder.
The only problem is, this only works when I run the website in Visual Studio and run my tests, testing the website, debugging, etc. The moment I publish (via File System in Visual Studio) the website to the directory: "C:/inetpub/Sites/[WebsiteFolder]", and navigates to the website's URL, the website does not work any more. It loads, but it does not get the file structure in the App_Data folder any more, it cannot create new folders, cannot rename them...
This website works fine when I upload it via FTP to another webs space that is hosted somewhere else at another hosting company (which is shared hosting).
So I guess (my best guess) the IIS on my VPS does not allow this kind of access. And I have been trying to find settings on IIS somewhere that would/could allow this.
I have enabled directory browsing, but that's probably the only thing I can think of other than making sure the directory is accessible (readable/writable).
Do you perhaps know what else I can try?
Ohkay, so this was a very silly mistake - but that's how we learn!
The App_Data folder did not have any other files or folders inside of it.
And as we know, ASP.NET does not publish empty directories. This means those empty folders never existed once I published the website.
There are 3 ways to fix this that I know of at the moment:
If your solution has a publish profile (so that you can publish the site), you can right click the empty folder in Visual Studio, and say Publish [FolderName] eg:
You can just create an empty file in that directory, and publish your whole website again. Because the folder is not empty any more, it publishes with the rest of the website.
Just manually create the folder on your hosting space.
Thanx for everyone's input!
Greatly appreciated!
I have an application that stores images uploaded by user. Those images goes to content/images/upload. Problem is that if i published without the skip extra files on destination, all user uploaded content gets deleted. Im pretty sure im doing it wrongly, which would be the best approach for this situation ?
im worried about losing user generated content this way misconfiguring an option in publish.
One approach I've used is to move the physical path of the "upload" older outside the application folder structure. I'd use an IIS virtual directory to mount the folder to the application. For example, if the folder structure currently looks like this:
c:\inetpub\
wwwroot\
content\
images\
upload\
You might change it to this:
c:\inetpub
upload\ <-- must be manually created on the web server
wwwroot\
content\
images\
You'd remove the upload folder from the web application in Visual Studio. Log into the webserver and create the folder under inetpub (could go anywhere, really). Then go into IIS manager and create a virtual directory called upload that points to the c:\inetpub\upload folder.
The upload folder is no longer part of the Visual Studio project so the "publish" feature won't touch it.
I have a website in vs2008. I have created a crystal report which works fine in the DEVELOPMENT environment. But when I publish my website to IIS, the report is never displayed. It just displays a blank page. Can anyone tell me how to resolve this issue?
Thanks
If you installed your application in a website different from Default WebSite, try this:
Solution
Copy aspnet_client folder from c:\inetpub\wwwroot folder to the new website root folder.
or in IIS:
Create a virtual directory called aspnet_client that points to c:\inetpub\wwwroot inside the new website.
Cause of the problem
Using client tools (debug window of your browser) or server tool (IIS log) you will find that some required Crystal files like crv.js and style.css are not served. That's because these files are placed by CR installer in wwwroot\aspnet_client folder, but they cannot be reached from other websites installed on the same machine.
I can see that you use different versions of software and different configurations, but I think you have the same problem.
Make sure Folder "2_0_50727" exists at C:\inetpub\wwwroot\aspnet_client\system_web
or your SiteRootFolder\aspnet_client\system_web
if not exists copy the folder "4_0_30319" as "2_0_50727".
If you are using Submit button for viewing the report, make sure you effect a full postback on submit button click. You will find that all pages in the report will work perfectly fine.
Note: Use Trigger with Update Panel to Effect the Full Post Back (The Control ID of the trigger should be the ID of the button).
Perfect! The solution is to work on IIS this way:
Copy aspnet_client folder from c:\inetpub\wwwroot folder to the new website root folder.
OR
Create a virtual directory called aspnet_client that points to c:\inetpub\wwwroot inside the new website
Thank you so much
You need to install the merge modules on the web server. You can download them from Here
Check the Crystal Report Run-time version, for example if you install version 13.0.1 and your Visual Studio uses 13.0.2 the report will display but not data will be displayed.