rdsserver.datafactory converttostring failure - asp-classic

I have a classic ASP application written many years ago that I'm trying to fix.
The following lines recently stopped working after w7 sp1 was applied.
set address = Server.CreateObject("ADOR.Recordset")
count = lo_connection.GetRecordset(sql,address,false, error)
Set RDF2 = Server.CreateObject("RDSServer.DataFactory")
Set teststring = RDF2.ConvertToString(address)
It fails on the last line there saying "Microsoft VBScript runtime error: Class doesn't support Automation"
A bit of searching found several articles like this one
http://blogs.technet.com/b/asiasupp/archive/2011/03/14/changes-in-mdac-adodb-com-components-in-windows-7-service-pack-1.aspx
that described the problem exactly. Where I am failing is that none of the suggested fixes seems to fix the problem. Any suggestions?

The solutions described in the link are not relevant here, since ASP is not early-bound - it uses OLE Automation. It might be worth re-registering the component which creates RDSServer.DataFactory objects (which is C:\Program Files\Common Files\system\msadc\msadcf.dll on my machines).
I looked up this object, and I found this Microsoft web page:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms681447(v=vs.85).aspx
"This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Applications that use RDS should migrate to WCF Data Service."
Doesn't sound too good.

Related

ASP.NET using AtalaSoft to convert Tiff compression

Using Atalasoft's free SDK,
http://www.atalasoft.com/free-dotnet-image-sdk
I added reference to the DotImage and DotImage.Lib dlls' to Visual Studio 2010.
My code:-
Atalasoft.Imaging.AtalaImage image = new Atalasoft.Imaging.AtalaImage(fileName);
Atalasoft.Imaging.Codec.TiffEncoder encoder = new Atalasoft.Imaging.Codec.TiffEncoder();
encoder.Compression = Atalasoft.Imaging.Codec.TiffCompression.Group4FaxEncoding;
image.Save(fileName, encoder, null); // destroys the original.
However when I run the code I get an error on the very first line:-
Unable to retrieve security descriptor for this frame.
Can anyone help me out with this?
Update:-
I added a further line of code:-
System.Security.Permissions.FileIOPermission f2 = new System.Security.Permissions.FileIOPermission(System.Security.Permissions.FileIOPermissionAccess.AllAccess, fileName);
Still the same error.
Philo,
Hi, I'm the support engineer you called in to yesterday. I apologize - after you called in, I received a note from our chief software architect asking us to help you out.
If you are still experiencing your issue, please do call back in and/or create a support case on our portal at https://www.atalasoft.com/support/my-portal/cases
A couple of tings that come to mind from your case: make sure you're targeting either x86 or x64 in your project's platform target (DotImage "has bitness") and make sure you're using the appropriate x86 or x64 Atalasoft references. (I strongly suggest our x86 while getting started as x64 has some additional hoops to jump through to get the licensing working.
Atalasoft does ship some AnyCPU dlls but they're for an extremely limited subset of use cases and if you have referenced those and/or are attempting to target your project to AnyCPU, this will cause all sorts of odd behavior.
Also, if you're targeting our .NET framework 4.0, make sure you're targeting the full framework and not "Client Profile" as DotImage has dependencies on components not present in the Client Profile version.
~DigitalSorceress
Did you have the the file with .lic extension in project section on the right side? Make sure about that.

Simple database connection in ASP.NET?

I would like to make a very simple page that reads and displays data from a (SQL Server) database.
I've been messing with ASP.NET MVC, but for what I want (a quick solution in a single, simple webpage) this seems like overkill. Razor WebPages seems a better solution.
The database object from WebMatrix.Data seems good, but I cannot get this to work in Visual Studio Express 2013. I keep on getting "The type or namespace name 'WebMatrix' cound not be found", even though I added WebMatrix.Data to the References of the project.
I've also tried using Entity Framework (even though that also seems like overkill), but that comes with other cryptic errors like "A namespace cannot directly contain memebers such as fields or methods" (with the error message leading to a source file that only contains "ErrorGeneratingOutput").
I really can't understand why this needs to be so difficult? I just want to quickly output some records from a database onto a webpage, nothing fancy.
I found the solution; I had to install the "Microsoft ASP.NET Web Pages Web Data" package using nuget.
I have not found any documentation on this; the StackOverflow answer at https://stackoverflow.com/a/11870874/72809 was the only one that pointed me in the right direction. It's still very unclear to me when one has to use "Add Reference" and when one has to use nuget, but I'm happy this problem is solved for now...

Exception when using localized resources in Windows Azure

I have been developing an application in classic ASP.NET and deploying it to azure. Until now, no problem at all. Now I want to add localized resources to support multi-language.
The App_GlobalResources/*.resources files works fine when running local, both outside and inside the azure emulator. But when I try to use them in Azure, I'm getting the following error:
Could not find any resources appropriate for the specified culture (or
the neutral culture) on disk. baseName:
SistemaRRHH.Signup.SignupLabels locationInfo: fileName:
SistemaRRHH.Signup.SignupLabels.resources.
The exception is very self-explanatory, buy I can't solve it in any way.
The exception is thrown here:
var requestCultureInfo = new CultureInfo(Utils.GetRequestFirstLanguageAccepted(Request.Headers["Accept-Language"]));
ResourceManager rm = ResourceManager.CreateFileBasedResourceManager(Constants.RESOURCE_FILE_LABELS_NAME, HttpContext.Current.Server.MapPath(Constants.RESOURCE_FILE_DIRECTORY), null);
letsGetItStartedLabel.Text = rm.GetString(Constants.LETS_GET_IT_STARTED_LABEL, requestCultureInfo);
Thanks a lot for your help!
I've noticed some localisation issues within Azure, specifically with DateTimes (the usual culprit) - are you based outside of the US? We're based in the UK and using a European Data Centre but still getting US-formatted dates within Azure. If that is the case, you could try creating en-US resource files as well to see if that fixes the issue. We added a globalization tag into the web.Config for now - a short term fix but gets past the issue until I can revisit.

flex3 autoupdater error

Dear all, I am working on flex3 and want to update my application by flex3 autoupdate. When my installed application runs, my checkUpdate function calls the autoUpdater code. It starts but when it reaches to 100%, it shows this error: "There was an error downloading the update. Error# 16824"
My mxml code is here http://tinypaste.com/92138b and server xml code is here http://tinypaste.com/e3792
Please guide me.
Many Thanks
Google is your friend for this one; it looks like you forgot to update the application descriptor version number in the updated version on the interweb.
http://dezeloper.wordpress.com/2010/01/21/adobe-air-updater-error-16824/
I was unable to see your code as our work router blocks tinypaste. That said, however, I can tell you that air updates done via the ApplicationUpdater class are all based upon the updater xml file that you create/copy-out-there, and the xml file used for the compiler that sets the filename, version, application ID, etc. (most of which is used for the exe-compiler/exe-wrapper that facilitates the "bridge" between the OS and your compiled actionscript code). This link, might help: dezeloper.wordpress.com.
All-in-all keep debugging. The ApplicationUpdater class is one that was relatively well-written and is pretty self-explainable... once you get past this bug, there are a couple more that might be a sync-the-xml-text pain-in-the-butt. For example... I can tell you that in AIR 1.0 (and this may still be true in recent releases) if you made a change to your application xml file, and you're compiling from eclipse/flexBuilder/flashBuilder, you had to "project > clean" for those xml options to get picked up.
Best of luck,
Jeremy

Active Record and Linq T4 Templates problem

I've started a C# web application project using subsonic 3.0.3 as my DAL and SQLite for database.
It doesn't have any problem when using SimpleRepo, but the problem occurs when I try to use ActiveRecord/Linq T4 templates.
It says "Metadata file 'System.Data.SQLite' could not be found". The settings.ttinclude is the one provided with SQLite.ttinclude file and its config looks ok, and other files are instructed to use SQLite.ttinclude of course. I've also tested them with an SQL Server database and everything goes fine.
Also tried searching about it on the net and all I could find were these:
Subsonic Google Groups which instructs me to add a reference to System.Data.SQLite to the top of settings.ttinclude. No luck.
Someone at here commented about this issue, and it was answered to check the connection string, which doesn't seem to be my problem, because the app works when I use SimpleRepo.
Is SQLite installed on your machine? You need the .NET driver for it as well (that's what can't be found).

Resources