Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / лицензирование контрола / 2 сообщений из 2, страница 1 из 1
31.08.2006, 15:37
    #33955834
parapet
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
лицензирование контрола
есть отдельная сборка, в ней есть 2 класса:

namespace Web
{
[LicenseProviderAttribute(typeof(MyLicenceProvider))]
public class testcontrol : TextBox
{
private License license = null;

public override void Dispose()
{
if (license != null)
{
license.Dispose();
license = null;
}
base.Dispose();
}

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
license = LicenseManager.Validate(typeof(testcontrol), this);
}

}

internal class MyLicenceProvider : LicFileLicenseProvider
{
public MyLicenceProvider()
{
}

protected override bool IsKeyValid(string key, Type type)
{
return true;
}

protected override string GetKey(Type type)
{
return base.GetKey(type);
}

public override License GetLicense(LicenseContext context, Type type, object instance, bool allowExceptions)
{
return base.GetLicense(context, type, instance, allowExceptions);
}
}
}

кидаю этот контрол на странице и в каталоге bin проекта размещаю
Web.testcontrol.lic

в ответ получаю ошибку (на выделенной строчке):
An instance of type 'Web.testcontrol' was being created, and a valid license could not be granted for the type 'Web.testcontrol'. Please, contact the manufacturer of the component for more information.


в чем я не прав?
...
Рейтинг: 0 / 0
31.08.2006, 16:32
    #33956107
parapet
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
лицензирование контрола
оно похоже лезет за этим файлом в ту темповую директорию, в которой asp.net размещает свои временные файлы
...
Рейтинг: 0 / 0
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / лицензирование контрола / 2 сообщений из 2, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]