first of all I'm a total newbie with Asp.net. On the other hand I use C# everyday.
So what I have to do is a fairly easy matter except for the fact that I don't know Asp.Net.
I am require to make a simple form that gathers data in a Sqlite database.
I am using VS2008 and the latest version of Sqlite.
Everything works fine when working locally (I can run the website and add data to the s3db db).
The problems are coming out when it comes to publishing. At the moment I am publishing ON MY FILE SYSTEM accordin to procedure Walkthrough: Deploying a Web Site Project by Using the Publish Web Site Tool
so when it comes to the paragraph Testing the published Website (published in the folder C:\CompiledWebSite so the local address is http://localhost/CompiledSite/Default.aspx) I get the error:
Server Error in '/CompiledSite' Application.
Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format.
which I didn't get when running it from VS2008.
So all what comes to my mind is that it's not a matter of Sqlite format but a problem related to the fact that it doesn't find the .s3db file which in the end there isn't in the folder C:\CompiledSite.
But I added it to the solution! And I can see it in the solution explorer structure.
I think that all problems come from my being totally unaware of how asp works but I have to find a solution!
can anybody help me?
thanx in advance!
I found it!!!
from
http://www.codeproject.com/Articles/548421/Anplusattemptpluswasplusmadeplustoplusloadplusaplu
it says to go to IIS and set Application Pools --> Advanced Settings --> Set "Enabled 32-Bit Application" to True and press OK
that worked!!
Related
Me and my friend are working on a project in c# ASP.NET and we are using git as version control. I am working on macOS and my friend is working on Windows. It have worked fine until one day ago when we had worked on my friend's computer and pushed the code. Later i tried to make a pull request and when i tried to run the code (that works fine on the Windows computer) i recieve this error message:
/Users/ludvig/.nuget/packages/ikvm.image/8.4.4/buildTransitive/IKVM.Image.targets(9,9): Error MSB4175: The task factory "RoslynCodeTaskFactory" could not be loaded from the assembly "/usr/local/share/dotnet/sdk/7.0.101/Microsoft.Build.Tasks.Core.dll". Could not load file or assembly 'System.CodeDom, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621) (MSB4175) (Monsterarenan)
We are using .net 6 and the IDE is Visual Studio. This is probably a poorly asked question but we both are new to ASP.NET and we did not find anyone with a similar problem.
There are many reasons for this error, here are three solutions, please try one by one:
The operation could not be completed successfully because the file contains a virus or potentially unwanted software. Please turn off all protections.
It may be a problem of path access rights. Please go to the folder where you are located and change the permission of your user name to user ownership in Properties-Security.
Open web.config and find the following related nodes.
Comment out these results and recompile.
I am attempting to publish my website to a intranet file server, but for some unknown reason a portion of the application seems to be referencing an old version of a class object. The class initializer is throwing an error stating that a stored procedure cannot be found. I know this is old code because that stored procedure no longer exists.
The error:
Could not find stored procedure 'stp_EMS_BM_EmployeeMovements'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Could not find
stored procedure 'stp_EMS_BM_EmployeeMovements'.
The web application runs perfectly on my local machine. I am currently publishing to the file server using Visual Studio 2015 Enterprise.
I have manually deleted all the files on the file server, rebuilt and published the project numerous times. Any recommendations on what to try next would be incredibly helpful.
It appears that some dependency was not fully updated on your website as it had been on your local server. To find what is different, here are two suggestions.
1) Use WinDiff on all your files, including .dll & .exe files. Some old files could have received a new modification date without being modified. WinDiff should show what files are different in these two environments.
2) Compare the file version numbers of like files in the two environments. If the file version was revised with your latest changes, this too will show what files are different in these two environments.
I created a web site with .NET 4.0 . I published it to my server's IIS. My web site is working. But after publish when i tried to add new forms they work on Visual Studio's localhost but doesn't work on IIS . For example I create etik.aspx . It works on Visual Studio but when I deploy it to IIS It gives me this error.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'BerksanWebSite.berknet.etik'.
Something else I add a change to my master page. It shows front changes (on aspx file) but changes in aspx.cs file doesn't work . I don't understand why it is not working. Can anybody help me?
Start from searching similar topics with same message
Parser Error when deploy ASP.NET application
Try to push back your changes and find which one cause error.
May be find a video tutorial. Try again for empty project and simple form.
I solved this problem with uploading new bin files to server. Thanks #Eldar
I am getting a parser error when I try to access this page
http://mosab2a.elkedeseen.org/reyady/
but locally it's working well
Check the version in the web server vs the one you build against
Try Re-Publishing your Site again correctly. Make sure to Re-build your site before publishing it. Follow all the steps correctly that are used to publish a site. Make sure you have the required .Net Framework installed in your server machine. Also try changing "CodeBehind" to "CodeFile" on your Line1
Check this link (Could not load type 'site._Default') as well
It has been two days and I haven't been able to make this application work in the hosting computer. This application is in a subdirectory and is written in C# the other application is C#. It work just fine down here in my development computer. I have been trying the following.
1.I made the changes to the web.config so it doesn't conflict.
(seems to be fine)
When I created the application was created with Version 3.5. I downgrade to 2.0
I have been recompiling, being sure that the .aspx file and the .cs file it's under the directory.
Waht Am I missing.
Any ADVISE/Comments or questions please let me know. This is frustrating. Below is the link and the error I get
http://www.martinesexpress-inc.com/PhoneControl/Default.aspx
Server Error in '/' Application.
Parser Error Description: An error
occurred during the parsing of a
resource required to service this
request. Please review the following
specific parse error details and
modify your source file appropriately.
Parser Error Message: Could not load
type 'ElLogPh._Default'.
Source Error:
Line 1: <%# Page Language="C#"
AutoEventWireup="true"
CodeBehind="Default.aspx.cs"
Inherits="ElLogPh._Default" %> Line 2:
Line 3:
Source File: /PhoneControl/Default.aspx Line: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET
Version:2.0.50727.3053
You're publishing to a sub directory (PhoneControl) of the application root (http://www.martinesexpress-inc.com/). If PhoneControl is not an application in IIS, then it will won't look for assemblies in http://www.martinesexpress-inc.com/PhoneControl/bin but http://www.martinesexpress-inc.com/bin.
Basically, in a nutshell, the dll that is compiled for you (and comtains the class 'ElLogPh._Default') is not being found. There are a few reasons for this to be the case, but here is the first that comes to mind, and the most likely:
The first question is, are you aware of how a Visual Studio web site project corresponds with an IIS application? This is incomplete, but the simplest description of the first thought that comes o mind.
When you create a web site project in Visual Studio and Build it (or publish it, since VS's publish process includes building it first) all of the code behind is compiled into dll's that are put in to the "bin" directory.
When you publish this out to the web site, an IIS application has one and only one bin directory. Any bin directories in nested folders are not treated as actual bin directories.
So, if you built this as a different project and just copied it into the original folder, your structure would look like this:
\Parent
\Parent\Bin
\Parent\YourNewApp\
\Parent\YourNewApp\Bin
I'm thinking that the ElLogPh._Default class is in a dll inside of \Parent\YourNewApp\Bin.
The resolution to this would be to go to the IIS manager and make \Parent\YourNewApp an application.
If it sounds like I'm on the right path, instructions for creating an application in IIS are found here: http://www.affiliatewiz.com/support/appstartpoint.asp
I don't know if this will help, but are you building in Release mode?