.net 4.0 - Upgrade Webforms Site From .net2 To .net4 | Accessing Referenced DLL Woes
Jan 24, 2011
I have an asp.net2 WebForms project which worked fine, including referencing a dll compiled for .Net2.
Problem is that I have now recompiled the dll for .Net4 and have also 'upgraded' the VS2010 asp.net WebForms project to .Net4 and the asp.net WebForms application won't access the dll.
The first time the dll is called I get System.NullReferenceException: Object reference not set to an instance of an object.
The new dll is accessed by other WinForms applications OK.
Whatever the problem is, VS2010 freezes and I need to use Task Manager to close it down.
View 1 Replies
Similar Messages:
Jun 6, 2010
I upgraded my site to works with Microsoft Visual Web Developer 2010 Express, works with .net 4.0 and new ajax tools. My site is manage on our site . Now it work on win server 2003 sp2 frameworks 2.0 ajax ast.net 2.0
Is the new upgrade site will work on the web sever ?Should I Upgrade the server to framework 4.0 ?
View 1 Replies
Jan 14, 2011
I'm updating an old process that already exists, which works as follows:
The user submits a form which runs the following asp (simplified, names changed):
<%
set rb = Server.CreateObject("RecordBuilder.SomeObject")
rb.Calculate()
rb.StartProcess()
%>
The RecordBuilder.SomeObject was an old VB6 DLL, I don't have VB6, so I converted it to VB.NeT 4.0
The call to Calculate() works as expected, the call to StartProcess() fails.
StartProcess() is the following:
Public Function StartProcess()
Try
strProcess = "Starting process"
Dim proc = New Process()
proc.StartInfo.RedirectStandardOutput = True
proc.StartInfo.UseShellExecute = False
proc.StartInfo.CreateNoWindow = True
proc.StartInfo.FileName = "d:AppRecordProcessor.exe"
Dim procHandle = proc.Start()
strProcess = "Started process"
Catch ex As Exception
Err.Raise(vbObjectError + 9999, "RecordBuilder.SomeObject", strProcess & " failed: " & ex.Message & "<hr />Stack Trace:<br />" & ex.StackTrace)
End Try
End Function
This fails with the call to proc.Start(), however if I copy the test ASP to a .vbs file it will work as expected.
I have changed the permissions on d:AppRecordProcessor.exe to grant execute permission to the group Everyone.
View 1 Replies
Oct 3, 2010
I am neither a server administrator nor very knowledgable about how to configure IIS, so I have the following problem:
My client hosts their public website from their own internal server running Server 2003 with IIS 6. The current website is a .NET 1.1 application configured as a website in IIS. Within this site a separate virtual directory configured as an application runs a separate .NET 1.1 app that serves as their online webstore.
I've been tasked with upgrading the website (not the webstore) to .NET 4 and getting it installed and working on their server. My initial plan was to simply change the existing websites home directory to the new home directory from the IIS admin console and be done, but then I read that this would break the application directory that hosts their online store because .NET 1.1 applications cannot be nested within .NET 4 applications. Can anyone confirm this?
View 3 Replies
Feb 2, 2010
I am having a little difficulty trying to wrap my head around site structures. I have quite a large asp.net site, for which: Admins can see a user list, Each user can have many accounts, and for each account can have many items. I can picture this as a breadcrumb trail of editing a particular item. User List > Mr Bob > Accounts > BOB77 > Items > Item32 > Edit
User List = All the users Mr Bob = A user the administrator has selected from the User List Accounts = A list of the user's accounts 12BOB = The administrator has selected the account named 12BOB Items = A list of the items an account contains Item32 = The item that the administrator selected Edit = The action that the administrator wants to do. I can picture how this would look like if it was using ASP.NET MVC with the URL, but I am unsure how to map this out using Webforms, and in the physical filesystem.
This is what I have thought up about how I am guessing the physical structure would look like. Will this have to use session variables to achieve what I am trying to do?
/Users/User/Edit.aspx <- for editing a user
/Users/User/View.aspx <- for viewing a user
/Users/User/Accounts/Default.aspx <- for viewing all accounts
/Users/User/Accounts/Account/View.aspx <- for viewing an account
/Users/User/Accounts/Account/Edit.aspx <- for editing an account
/Users/User/Accounts/Account/Items/Default.aspx <- for viewing all items in an account
/Users/User/Accounts/Account/Items/Item/Edit.aspx <- for editing an item
Where can I read more about this kind of setup in a web application? Or, can someone point me in the direction of an available project that has this kind of layout?
View 1 Replies
Jun 7, 2010
site that is multilingual.I am using a database to store the text I have a translation object that loads the correct language using session variables.I recently found that on google.fr for example,only the english text is referenced and no french text at all.
View 1 Replies
Mar 4, 2011
What I'm looking for is a good sample of an open source WebForms site which contains demonstrations of some best practices, design patterns etc. Just want too look how experienced people apply their knowledge to build websites which can be shown to everybody without shame :)It would be good if the samples show these technologies: IoC, Entity Framework, Unit testing (with mocks), jQuery. The small samples which demonstrate the particular technology are useless as I've already examined many of them.My goal it to improve the existing huge WinForms application, so I'm not interested in ASP.NET MVC for the time being
View 1 Replies
Jan 26, 2011
is it possible to set a user defined timeout value on an asp.net website...i have a table that stores the time out value for each user of my website...i need to set the time out based on who logged in...i know that the default aspnet timeout setting is 20 mins of inactivity...is there any way i can circumvent this...and yes i do need to show a modal when the timeout expires and need to reset the timeout value if the user wants to continue the session or log them out if they choose not to continue...
View 1 Replies
Jun 25, 2010
Working on an ecommerce site which will be integrated with a 3rd party vendor--that vendor uses different identifiers for stores than we use internally (i.e. their store ABC123 is our 001-321). I'm researching the best approach to inspect incoming requests for reserved query-string parameters that indicate the request is using their identifiers and map the identifiers back to our identifiers (so if the request is example.com/&theirId=ABC123 I want to transform the request to example.com/&ourId=001-321). To do this mapping I need to inspect the provided ID, execute a lookup against the database or cache, and forward the request to the specified page--limiting the modifications to just the query-string parameters (other parameters will need to be maintained, as with the details of the HTTPHeader, etc). So far I'm researching a few different approaches: Implementing it in a base Page (which already does too much, but has the benefit of our Logging infrastructure and some other injected dependencies) Implementing it in an IHttpModule Using URL RewritingUsing URL Routing (looks like routing isn't what I want, feel free to offer insight if you think it still fits) Performance cost is a consideration: the actual number of times this translation will occur will be very small compared to the number of requests not requiring it--perhaps 1%. However for another integrated site we will perform this mapping on nearly every request--would a different approach be better suited to this scenario from the previous?
View 3 Replies
Jun 11, 2010
I have a site that is using Forms Auth. The client does not want the site session to expire at all for users. In the login page codebehind, the following code is used:
// user passed validation
FormsAuthentication.Initialize();
// grab the user's roles out of the database
String strRole = AssignRoles(UserName.Text);
// creates forms auth ticket with expiration date of 100 years from now and make it persistent
FormsAuthenticationTicket fat = new FormsAuthenticationTicket(1,
UserName.Text, DateTime.Now,
DateTime.Now.AddYears(100), true, strRole,
FormsAuthentication.FormsCookiePath);
// create a cookie and throw the ticket in there, set expiration date to 100 years from now
HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName,
FormsAuthentication.Encrypt(fat)) { Expires = DateTime.Now.AddYears(100) };
// add the cookie to the response queue
Response.Cookies.Add(cookie);
Response.Redirect(FormsAuthentication.GetRedirectUrl(UserName.Text, false));
The web.config file auth section looks like this:
<authentication mode="Forms">
<forms name="APLOnlineCompliance" loginUrl="~/Login.aspx" defaultUrl="~/Course/CourseViewer.aspx" />
</authentication>
When I log into the site I do see the cookie correctly being sent to the browser and passed back up: However, when I walk away for 20 minutes or so, come back and try to do anything on the site, the login window reappears. This solution was working for a while on our servers - now it's back. The problem doesn't occur on my local dev box running Cassini in VS2008.
View 3 Replies
Jan 2, 2011
I got a a problem when using ToolkitScriptManager on masterPage with other webForm in SUbDirectory. Everytime I run other webform in the SubDirectory there was an Error "The ScriptManager must appear before any controls that need it". Then I added ToolkitScriptManager to that page I got another Error "Only one instance of a ScriptManager can be added to the page". hmmmm then I removed the ToolkitScriptManager from the MasterPage, It's worked for that page.
on that SubDirectory I had a webConfig file.
<?xml version="1.0"?>
<configuration>
<location path="MyPage.aspx">
<system.web>
[Code]....
View 2 Replies
Feb 13, 2011
I'm a complete newbie when it comes to SQL, and to be honest it frightens the hell out of me too.
I've been running a version of SQL 2008 Express for sometime, however after getting some free software off Microsoft I updated my version of Visual Studio to professional and then tried to update my Express version of SQL to 2008 R1.
I downloaded it from the MS site and proceeded to work through the pre-installation instructions, however I wasn't offered the opportunity of installing a new instance and was then advised there was nothing to upgrade on the version I had installed.
When I go into SQL management studio I can see the database I used to be able to access but can't expand it. My version of SQL is 10.0.2531.whats happening or how to work around it?
View 1 Replies
Oct 25, 2010
I want to create an asp.net based website. When I create the sit eon my local machine I am uploading pdf files to my file system then accessing the files to view in my website. When I make the site go live how do I translatye this? Can I have files saved somehow with my interenet host? How would I access the files though the internet host on my application?
View 2 Replies
May 17, 2010
I'm in need of some serious help that has been plaging be for a long time. I have built a custom ASP.NET route handler for handling my product navigation. And my URLS keep breaking.There are so many variations of the manufacturers and thier respective models, that I have been forced to use a massive regular expressions to verify which page to route to and which members and thier properties to populate.
[Code]...
View 1 Replies
Apr 16, 2010
this simple cause the problem is simpleA CCDD puling back 788 items works in .net 3.5 site, EXACT same site with just the build framework changed in Property pages to .net4, well it givies Method 500 error.Reducing the num of items to 698 works in .net 4.Played around with the maxJsonLength (5000000 999999999 etc) setting in webconfig for a day. Made no difference.Data saved as a csv is 23kb or 3000 characters acording to word.
<asp:CascadingDropDown ID="CascadingDropDown2" runat="server" ParentControlID="DDListManufacturer"
TargetControlID="DDAppliance" Category="Appliance" LoadingText="[Loading appliances...]"
PromptText="Select an appliance" ServicePath="UtilityService.asmx" ServiceMethod="GetAppsForManuBD" >
[code]...
View 1 Replies
Feb 7, 2011
Environment: Windows 2008 R2 x64 [IIS7.5]
irectoryInfo("D:MySecretFolder")
I get thrown the following error.
'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed
Application pool is using NetworkService account as its identity and I have given that account full rights on that folder.
View 2 Replies
Aug 10, 2010
let me know how to export asp.net4.0 chart data to pdf/excel .
View 2 Replies
Jul 26, 2010
I have a web-service that I am trying to write.
Part of it's function will be to write files to other servers accessable via file share on the same domain. With that in mind I enabled impersonation and set up the account. I now get the following error:
The current identity ([domainuseraccount]) does not have write access to 'C:WindowsMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET Files'.
I have gone into the security tab for this directory and added this user with FULL CONTROL, I can reboot the server and re-look at the security tab for this directory and I can SEE that the permission are there.
If I take the impersonation account and make it an administrator it all works fine. Obviously that is NOT what I want to do.This is a windows 2008 R2 server running on a domain. The impersonation account is a domain account not a local account. The impersonation account has been added to the local 'Users' group.
I am stumped. I can see that the account DOES have full permissions on the directory, but the error message persists.Back in the days of Windows 2000 there were steps that had to be taken to set ntfs permissions that would allow impersonation (or even the asp.net) accounts to work properly. I have not found a similar document for Windows 2008 R2.
View 2 Replies
Jun 17, 2010
I have isolated the problem in two project which are the same except one targets 3.5 and the other 4.0This is breaking my app, and really causing major headaches.This is the mapping of the route:
[Code]....
Which uses a custom contraint:
[Code]....
This is the controller Action
[Code]....
In Home/Index.aspx I have created a few links:
[Code]....
All link have a different link text wich I use here to reffer to themThis generates the following links which are in my opinion faulty in both frameworks, but 4.0 offers no workaround.In 3.5:
actionlink = /Home/Special (?)
actionlink routevalues = /MyPrefix (This is what I want)
routelink= / (?)
[code]...
View 6 Replies
Dec 3, 2010
we have an web site access on PRODTEST Environment . We are facing an issue site works fine when we try to access the site using the Individual Server names (with Ip address).
View 2 Replies
Jun 16, 2010
I have been trying to fix this issue for several hours now, and I was hoping to find out if someone can shed some more light on it. I get the above error on ONLY ONE virtual root in my IIS 5.1 installation. I have other web sites I am developing in .NET 2.0 and 3.5 and they seem to work fine. This is a development workstation with only 1 user, and I get this error continuallyevery time I access only 1 of my web sites - even after rebooting the machine. It makes no difference what order I access the web sites in - this one always fails and the other ones always succeed.
Note that the web site does not use frames and the changes I made to it yesterday (just adding some javascript and a few span elements to support BuySafe's new 3-in-1 guarantee program) were very minor.OS: Windows XP/IIS 5.1Dev Environment: Visual Studio 2005/.NET 2.0Browser IIS 7.0Every page on the internet I have read about this seems to indicate it must be something with the "HTTP Keep Alive" setting. I disabled this setting but it made no difference at all.I keep full backups of my machine and I restored my OS/IIS partition from a few days ago (including the full IIS metabase), but I still continue to get the same error.The error suddenly started occuring today - I just made some updates on the web site and deployed them to production yesterday (and neither my test or production servers are exhibiting this behavior). It happened after a power failure and my UPS software forced my Lenovo T500 laptop to sleep. When the power failure occurred, both VS 2005 and a browser with this web site were open on the machine. The machine woke up and the programs were all still running, but I was no longer to access this web site.I had a problem like this years ago and I ended up rebuilding the machine from scratch. Please give me an alternate solution.Full Error Message:The page cannot be displayedThere are too many people accessing the Web site at this time.Please try the following:Click the Refresh button, or try again later. Open the localhost home page, and then look for links to the information you want.HTTP 403.9 - Access Forbidden: Too many users are connectedInternet Information ServicesTechnical Information (for support personnel)Background:This error can occur if the Web server is busy and cannot process your request due to heavy traffic.More information:icrosoft Support
View 2 Replies
Sep 6, 2010
I want to run an ASP.Net application on Windows Server 2003 and access it over a LAN.
Like http://serverIP/sitename.com
How do I do this? What configuration changes should I make to IIS?
View 1 Replies
Jun 2, 2010
After publishing the web application on the web host there si following error.It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
View 1 Replies
Jun 11, 2010
While i was using asp.net login control on my aspx page and deployed that page on IIS
NOBODY WAS ABLE TO LOGIN
Though it worked properly on asp.net development server in visual studio 2005
View 2 Replies
Jan 27, 2010
I've been working on a project that's been a rather seat-of-the-pants experience. We have MOSS 2007 and Silverlight 3 installed. We're trying to make use of some new 3rd party software, Visual Fusion([URL] While working through the tutorial I ran into a bit of an issue. All I really have to go on is the guidance package and sample stuff they provided so it's still a little fuzzy. Basically when I debug the project in Visual Studio 2008, instead of loading the default.aspx page, I get this on my browser instead:
Server Error in '/' Application.
Could not load file or assembly 'Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' 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 'Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +86
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
I've spent the last few hours poking around for answers and it seems to be related to the fact that I'm running this all on a 64-bit machine, but all the references to workarounds I found were rather vague.
View 2 Replies