Using Web.Caching on XP Running IIS 5.1 Not available? - visual-studio-2005

Environment: I am working on a site in ASP.Net 2.0 running on IIS6; I am developing locally on WinXP which runs IIS 5.1, using VS2005 and VB.
Issue: I am trying to create caching for some business layer objects (actually creating a caching layer) using System.web.caching.cache. This should be available under System.Web namespace but all that I seem to have access to are: AspNetHostingPermission, AspNetHostingPermissionAttribute and AspNetHostingPermissionLevel (I have a reference to System.Web in the project and imports in the class). There are quite a few other classes (e.g., HTTPRuntime) which also do not appear (this is per the "Using SQL Cache Dependencies" tutorial http://www.asp.net/web-forms/tutorials/data-access/caching-data/using-sql-cache-dependencies-vb).
I'm at the end of my rope and can't seem to find anything out there to explain this. Has anyone been in this situation and seen this before? Any help getting this solved is MUCH appreciated!

OK, so not sure why I didn't think of this before but I checked the references tab under the project properties. In the list for System.web, the additional namespaces were unchecked; checking System.Web.Caching and recompiling fixed the issue.
Sometimes you're just toooooo close to something to realize the easy answer.

Related

LicenseException for SectionReports, ActiveReports 7.0.6158.0

In an MVC app I am working on, we've recently began using ActiveReports 7 for our report-generating needs. On my local machine, everything works great. However, when we deploy to our Dev server for team-level testing, we get a LicenseException:
License for the SectionReport cannot be found.
We followed the user guide here to attempt different ways to resolve the problem.
What we have done:
Ensured that the licenses.licx file references the assemblies, and that the correct ActiveReports 7 assemblies are being built with and referenced by our project. As it stands, the licenses.licx file looks like this (sans the line-breaks):
GrapeCity.ActiveReports.SectionReport, GrapeCity.ActiveReports.v7, Version=7.0.6158.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport, GrapeCity.ActiveReports.Export.Pdf.v7, Version=7.0.6158.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff
As this is a MVC web project, used the Assembly License Generator that comes with AR7 to create an [Assembly].Web.License.dll library, which we are building with the project in a /lib/ directory at the solution-level. This change had no effect on the License exception.
Used the Web Key Generator to create a key for the App.config file. This change had no effect on the License exception.
What we have not done:
Created some web form, and created an App_License.dll library that gets built with our project. The reason we did not do this is we are not using Web controls for our reports, we are not even using the GrapeCity.ActiveReports.Web assembly, and the error is not coming from any class in that library (which is logical, seeing how we're not using it.)
The only notable detail of all of this is that modifying the licenses.licx file had an early effect as we had a similar license exception on another component; ensuring that licenses.licx had the proper details ensured that that other component was no longer throwing LicenseExceptions in our app. I tentatively think from this that maybe my licenses.licx file still lacks something needed to make this app work.
The only thing remaining I can think to do is to recommend our lead license our server as a developer, but this possibility has already come up, and the direction we've been asked to take is to avoid that route if at all possible. I think it is possible because I have encountered similar posts involving people who followed the steps in the user guide above and presumably were able to solve the issue. Yet, for my team, these steps aren't working.
Question: What am I missing?
Using the Assembly License Generator as you have done should do the trick. Also, make sure that you are using the latest version of AR7 as according to this post on the ActiveReports 7 Support Forums, there was a fix done to some later version of ActiveReports 7 to correct some problem with licensing in this scenario. Specifically the steps given from the previously cited post said that following the below steps with the updated version corrected someone else's problem:
Run the program "ApplicationLicenseGenerator.exe" (as Administrator) from a location similar to "C:\Program Files\Common Files\ComponentOne\ActiveReports Developer 7\"ApplicationLicenseGenerator.exe"
Browse to the compiled ActiveReports DLL.
Press the "Generate" Button.
This generates a satellite assembly similar to yourclasslibraryname.dll.GrapeCity.Licenses.dll
Place the DLL in the bin folder of your web project and/or reference the generated DLL in your web service project.
Answer: for non-licensed users, [Assembly].GrapeCity.License.dll must be added to the web project as a reference!
Licenses.licx matters from a build perspective, though. But the license file was not missing anything.

strange problem with referenced log4net assembly

I'm not sure if this problem is connected specifically with log4net or this is some problem with VS.
Everytime I'm trying, I have the same result. But let's start from the beginning.
I'm creating a simply console application (.net 4) and using nuget to install the log4net library.
Now, when I want to add some code from it, intellisense works ok:
But when I try to compile it, I have an error
This is the only one assembly I found to this moment, I have this problem with. I have absolutly no idea what (and why) is going on. I have checked with two other solutions and problem is the same. I have not checked manually downloaded version yet.
Most likely there is an underlying dependency that is missing. One very common reason is the project is using the Client Profile instead of the full .NET 4.0. (Not sure about log4Net, but I run into this a lot when including third party libraries, esp. those with ties to the web). If I am correct, simply going into properties and changing the framework version to full .NET 4.0 will solve the issue.

Add reference failing C#

I have a wcf service running and I was trying to implement a tcp model on it so I made a windows service and tried adding the WCF service as a reference to it which worked fine. But when i tried to build the windows service it gave me an error as "The type or namespace name '*' could not be found (are you missing a using directive or an assembly reference?)". In fact I tried to add my dal project as reference and the same error cropped up. I implemented a POC just to check if I am doing things correctly which worked fine. But it fails on my solution am I missing some configuration thing I am confused please help thanks.
It is important that you document the type name that it complains about to get a good answer. Avoid targeting the .NET client profile whenever you do something webby. System.Web.dll is not part of it.
Project + Properties, Application tab, Target framework combo.
Thank's for all the help guys I got the reason why it was failing all my other projects are having target framework as .Net Framework 4. But each time I add a new project to my solution they are been targeted to .Net Framework 4 Client Profile. Which I changed and everything worked fine. Thank's again for the help.

Add Web Service Reference Weird Problem in WP7

I have a WP7 project in VS2010 pro/ultimate and I have added a web reference from another project on the same solution. The web service project is just a normal website project, I just created .ASMX file. I tested the service using web browser and it works fine.
The problem is, after I added this service as service reference, I cannot reference it in my WP7 project and I can't view it in Object Browser either as if it doesn't exist.
I use local URL like 'http://localhost:12345/WebService.asmx' when I added the service, VS can see all the methods and can add successfully. Very strange for me and I don't know how to solve this issue.
Anyone can give me any clue on this? Thanks very much.
I've had a similar issues before- on one machine, a restart was required, on another, I had to uninstall ALL of my SL stuff, then uninstall Vstudio, then reinstall and reapply any SL add-ons.
Then it worked fine.
Also had a friend with the same issue- uninstall all, then reinstall worked for him also.
I believe these were machines with pre-rtm SL and Phone bits on them.
I've had a similar problem. I created a WP7 project using VB.Net. I built a WCF Class web service, a client side proxy class, and then a WP7 application with the service reference. When I added the service reference, the code generating utility would not build the required Reference.svcmap file detail (it only created the header information). However the project would still compile, yet I couldn't reference the service in code as it didn't exist in the underlying files.
I tried recreating the WP7 project in C# and everything worked. My guess is that the VB implementation of WP7 might still have some issues, however that is a guess only. I'm keen to see if anyone else has had the same issue specific to the VB WP7 template or if it is something else.
I bumped into the same problem, but it was fixed after a reboot as suggested in this thread by dethSwatch.
I do remember that a silverlight SDK update was installed a bit earlier, maybe the reboot is required after the update?
I think this issue might be related to the January Update to the WP7 tools. I managed to fix this issue by installing the VS10-KB2486994-x86.exe fix found on the above page. That sorted the issue I had with generating a client side proxy for the WCF service I wanted to call. Hope this helps.

Visual studio 2010 colourizers, intellisense and the rest. Where to start!

Ok, before I begin I realize that there is a lot of documentation on this subject but I have thus far failed to get even basic colourization working for VS2010.
My goal is to simply get to a point where I can open a document and everything is coloured red, from here I can implement the relevant parsing logic.
Here's what I have tried/found:
1) Downloaded all the relevent SDK's and such- Found the ook sample (http://code.msdn.microsoft.com/ookLanguage) - didn't build, didn't work.
2) Knowing almost nothing about MEF read through "Implementing a Language Service By Using the Managed Package Framework" - http://msdn.microsoft.com/en-us/library/bb166533(v=VS.100).aspx
This was pretty much a copy and paste of all the basic stuff here, and also updating some references which were out of date with the sample see: http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/a310fe67-afd2-4592-b295-3fc86fec7996
Now, I have got to a point where when running the package MEF appears to have hooked up correctly (I know this because with the debugger open I can see that the packages initialize and FDoIdle methods are being hit).
When I open a file of the extension I have registered with the ProvideLanguageExtensionAttribute everything dies as if in an endless loop, yet no debug symbols hit (though they are loaded).
Looking at the ook sample and the MEF examples they seem to be totally different approaches to the same problem. In the ook sample there are notions of Clasifications and Completion controllers which aren't mentioned in the MEF example. Also, they don't seem to create a Package or Language service, so I have no idea how it should work?
With the MEF example, my assumption is that I need to hook into the "IScanner.ScanTokenAndProvideInfoAboutIt" to provide syntax highlighting? Which would be fine if I could ever hit this method.
So my first question I guess is which approach should I be taking here? Or do they both somehow tie together?
My second questions is, where can I find a basic fully working project that implements bog standard basic syntax highlighting and intellisense or VS2010?
Thirdly, in the MEF example when I created a Package there were a bunch of test projects created for me. I appears that the integration tests launch the VS2010 test rig somehow, but the test fails. It would be good to write my service with tests but I have no idea what/how I can test each interaction so any references to testing Language services would be helpful.
Finally, please throw any resource/book links my way that I may find useful.
Cheers, Chris.
N.B. Sorry I realize this is part question part rant, but I have never been so confused.
First, the package example is not using MEF. Essentially everyplace that you mention MEF in your question is not actually MEF, but the managed package framework (MPF), also colloquially called the managed language service (MLS). You'd know if your extension was using MEF by two things: the vsixmanifest lists your assembly as containing a MEF component, and you see [Export] and [Import] attributes in the code.
The easiest way to do this is to use MEF. Since you have the SDK installed, you also have a template for an editor classifier project (under C# (or VB)->Extensibility->Editor classifier in the New Project dialog). You can certainly do this with a language service/colorizer/package, but there will be significantly more code than the equivalent classifier.
The Ook solution is the sample for this and should work; if it doesn't build/work, then can you send me email (noahric at microsoft) with what errors you are seeing so I can email the owner of that sample?
In general, you should also read my answer for the question on "How can I write a plugin for VS2010 using MEF?". That has links to other resources that should help.

Resources