How to configure Telerik in ASP.NET? - c#

I have been working with ASP.NET for a while, but I have never worked with such old applications (which were made more than 10 years ago). At this moment I have a problem with the Telerik license, because I'm trying to locate and configure the licenseKey but I can't find the location where the files needed to modify them are located.
I was checking the Web.config but the license key is not there, I was also looking for the LicenseFile.xml file as indicated in the documentation but I can't find this file in the project nor in the location of the C: disk.
Finally I did a global search in the project code and I can't find where the license can be configured.
Do any of you know where I can locate the license to be able to configure it? Please I need to make some adjustments on it. Thank you very much for your help

Related

Revit plugin DLLs downloaded from my GitHub don´t work. The ones compiled in my machine load fine

Sorry for the long title, I´ll try to be brief.
I have developed a collection of IExternalCommands for Revit 2020 using C# and Visual Studio. Also an IExternalApplication for a ribbon to contain them.
They work like charm in my computer.
I am using GitHub to store the project and I am testing what another person would need to do in order to install my plugins:
Downloading the DLLs from GitHub into my computer.
Copying the necessary .dlls and .addin files in one of the Revit addins folder %programdata%/Autodesk/...etc.
I open my Revit... my surprise is that I get the following error:
System.IO.FileLoadException
Could not load file or assembly
'file:///C:\ProgrammData\Autodesk\ApplicationPlugin...\ArpRibbon.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
But if I use the DLLs that have been compiled locally in my machine... it works! How is that possible? Does anyone know what am I doing wrong? I have been searching but can´t find anyone with a similar problem.
Many thanks in advance.
As from comment:
Just a thought, but the file is loaded from internet. Maybe windows security mechanism kicks in. Can you browse to the file with explorer and right click to see it properties? There might be some security details there about disabling access due to external dll.
This indeed proved to be the case.
You can mark the question as answered by copying Stefan's comment into an answer and confirming that it solves the issue:
Just a thought, but the file is loaded from internet. Maybe windows security mechanism kicks in. Can you browse to the file with explorer and right click to see it properties? There might be some security details there about disabling access due to external dll. – Stefan 17 hours ago
Thank you both for your quick responses. The issue was exactly what #Stefan suggested. There was a security message in the properties file saying: "This file came from another computer and might be blocked to help protect this computer." And then an *Unblock" checkbox. I unblocked the dll and it worked. In my case I was downloading the files with google Chrome. Many thanks again! How can I mark the question as answered? – angelrps 4 hours ago

How to make a setup for c# app that uses a vbscript copying a file from LAN?

So i Have this c# application that contains a button allowing a file copy from a network share folder.i use a vbscript to copy the file, this script takes the source and destination path.now i want to create a setup to install my application on any PC connected to the LAN. the thing is the path will eventually change so i'm not sure if it will work.
I never made a setup before and i'm wondering if there is a way to customise the setup to allow the installer to make the changes.otherwise any solution will be very helpfull. thank you
I don't normally like giving answers that are mostly links, but it is too much to post here. Here is a quick summary:
There are quite a few things that can do what you are asking.
The one I like is called Squirrel. I recently had to learn how to use it while deploying an application for my company.
The steps in a nutshell(see what I did there? :)
Build your application (optionally add the update checker code
first - see links for details)
Package your application into a .nuget file using Nuget Package Explorer(details in links below)
Run the squirrel --releasify on your nuget
It will output the setup files that you are looking for in the Releases directory.
More information (that you will likely need):
Github - Squirrel.Windows
Youtube - Video tutorial that I found helpful
Github - Squirrel Getting started guide
As for your vbscript, I would do the file copy inside C#. You are very likely to run into permissions issues when using vbs. In any case, why add the complexity of 2 different languages when C# can do a file copy easily.
Something like this during your application's startup.
if (File.Exists(localFileName) == false) // check to see if the file is needed
{
File.Copy(sourceFileOnLan, destinationFile); // get the file
}
If you are really set on using a vbs file, you can launch it using Process.Start() and let Windows execute it.
Also, you can store the paths in your app.config file, and update them if/when they change.

Automatically Install Module/Extension in DNN (DotNetNuke)

Does anyone know if there is a way of automatically installing an extension on DNN using .net ?
It used to be possible using the infamous Install.aspx page, which has been removed for security reasons.
I've tried refactoring the code within Install.aspx so as to automate this, or even run it for a single module, but no luck. I've just got to the point where the zip has gets unpackaged, but what I really want is to know which and how the tables in the Sql Server database get modified.
I would appreciate any pointers on this.
It is quite hard to find all the tables that get updated, as well as the data that gets put into them.
My solution was is to simply call a copy of the installation page, which can be done from, say, a desktop app. For some reason the original Install.aspx won't run if you add it to the DNN installation. Step by step:
Find the Install.aspx and Install.aspx.cs files. They are deleted after the first installation, but you can get them from the original download.
Make a copy of these two files and rename them, e.g. MyInstall.aspx and MyInstall.aspx.cs
In Visual Studio run the DNN installation as a web site, not as a web project.
Now the page MyInstall will work just as the Install did. You can pass the parameters in the url.
Before you call the page, you need to put your module packages into the corresponding folder e.g. for modules install/module of the DNN Installation. To create the module package use Christoc's VS templates.

Creating custom section Umbraco 4.11

I have recently upgraded to the newest Umbraco 4.11.1 and the old way to create custom sections doesn't seem to work any more. Which isn't a bad thing because that didn't really work well. However I can't seem to find any information at all on how to create one in the newer versions.
I found this blog post:
as from here on the entries for applications and application trees have now been moved to config files located in the config folder. Unsurprisingly, these are named applications.config and trees.config.
However I don't even have applications.config and trees.config.
And I can't find any other information about this.
Thank you,
Thomas
Because you upgraded the site, you probably didn't copy any files from the config folder. I'd suggest copying the applications.config and trees.config from the zip you downloaded for the upgrade.

Where can I find ninject.web.mvc.dll?

I feel stupid for even asking this, but I can't find the file anywhere.
I've added Areas to my MVC 2 application. It caused some errors with Ninject, and after some research, I found the solution. Part of the solution is that I need new .dlls, ninject and ninject.web.mvc.
Everywhere I look, it says to go here (https://github.com/ninject/ninject.web.mvc) to get the .dlls. I've downloaded and searched through the download, and can't find it, it's not in there.
Where can I get it?
Grab the latest of everything from our build server on codebetter.com. Just look at the build artifacts from whichever MVC version you are using.
You need to build them. There are instructions on how to build them in the download package.
Once you download the source code from GitHub you need to build it.

Categories

Resources