Форум SAPE.RU

Форум SAPE.RU (http://forum.sape.ru/index.php)
-   Установка кода на различные движки (http://forum.sape.ru/forumdisplay.php?f=26)
-   -   Новый код для платформы ASP.NET (http://forum.sape.ru/showthread.php?t=25784)

detamc 21.04.2011 14:01

Добрый день, сказали обратится с проблемой к вам.

Я установил код на сайт, но ссылки не отображаются (там где должны стоять ссылки отображается <!--check code-->), все купленные ссылки в статусе error.

настройки в sapelinks.inc

PHP код:

sapeVersion "0.5"
sapeUser "94aa777340a7fb001ec710ea8edebff4"
sapeHost "http://www.мойсайт.ru"
sapeUrl "http://dispenser-01.sape.ru/"
rawFileName Request.ServerVariables("APPL_PHYSICAL_PATH")&"94aa777340a7fb001ec710ea8edebff4\sapeRaw.txt"
incFileName Request.ServerVariables("APPL_PHYSICAL_PATH")&"94aa777340a7fb001ec710ea8edebff4\sape.inc"
updateTimeout 60
linksHeader 
""
linksFooter ""
defaultDocument "default.asp" 

файл sapeRaw.txt:

PHP код:

a:5:{s:18:"__sape_delimiter__";s:0:"";s:12:"__for_user__";s:32:"94aa777340a7fb001ec710ea8edebff4";s:12:"__for_host__";s:20:"http://www.мойсайт.ru";s:16:"__sape_new_url__";s:17:"<!--check code-->";s:12:"__sape_ips__";a:2:{i:0;s:13:"188.72.80.205";i:1;s:13:"188.72.80.201";}} 

файл sape.inc:

PHP код:

<%
dim linksCheckUrl
if Request.QueryString="" then
linksCheckUrl 
Request.ServerVariables("URL")
else
linksCheckUrl Request.ServerVariables("URL") & "?" Request.QueryString
end 
if
select case LCase(linksCheckUrl)
case 
LCase("__for_user__")
%><%
case 
LCase("94aa777340a7fb001ec710ea8edebff4")
%><%
case 
LCase("__for_host__")
%><%
case 
LCase("http://www.мойсайт.ru")
%><%
case 
LCase("__sape_ips__")
%><%
case 
LCase("188.72.80.205")
%><%
case 
LCase("188.72.80.201")
%><%
case else
%><!--
check code--><%
end select
%> 

кодировка сайта: windows-1251

при клике на error выводится сообщение «Возникла ошибка при загрузке!»

Адрес сайта могу выслать в ЛС

Помогите разобраться, что я сделал не так?

khourshed 25.01.2012 18:03

Уважаемая администрация!
У меня постоянно вылетает сайт с ошибкой The given key was not present in the dictionary. после перезагрузки сервера.

Нашел этот топик и обнаружил что у меня файл датирован 21.05.2011 г при том что в топике файл датирован 11.06.2010.

Ни из личной панели ни с головы сайта не очевидно где находятся последние бинарники.
За маркетинг и юзабилити ставлю твердый кол. Просто зае@ался искать.
Дайте вразумительный ответ где находятся последние бинарники и что делать с моей ошибкой.
Конфиг следующий:

<configSections>
<sectionGroup name="effetto.Sape">
<section name="SapeConfig"
type="effetto.Sape.SapeConfigSection, SAPE"
allowLocation="true"
requirePermission="false"
allowDefinition="Everywhere"/>
</sectionGroup>
</configSections>
<effetto.Sape>
<SapeConfig UserId="00000000000000000000000000000000" ForceCheckCode="false" CacheTimeout="60">
<DefaultDocuments>
<add Name="Default.aspx" />
</DefaultDocuments>
</SapeConfig>
</effetto.Sape>

JeryMouse 08.02.2012 13:52

Добрый день

Неожиданно с нескольких сайтов ASP.NET пропали все ссылки.
Все ссылки находятся в статусе ERROR - не найденна.
На сайтах ничего не менялось, код Sape не удалялся.

Проверил по указанной здесь инструкции - отсутствовали папки App_Data
(подчеркну, что до этого все работало нормально - изменения на сайтах не делались, по всей видимости работало без App_Data)

Создал папки App_Data - в них появились файлы sape.bin
и регулярно обновляются. Ссылок пока не вижу.

Можно ли как то проверить правильность работы?
В чем может быть причина?

kotbert 17.02.2012 13:32

А что делать в Web.config нет нужных веток?
 
Есть инструкция как добавлять код asp.net

Но что делать если в web.config'е нет необходимых веток?

Например, нет пути configSections, нет веток system.web/pages/controls.
При добавлении необходимых веток сразу сайт ломается и возникает куча ошибок.

Пример Web-config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<system.web>

<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to
false will improve runtime performance of this application.
Set compilation debug="true" to insert debugging symbols (.pdb information)
into the compiled page. Because this creates a larger file that executes
more slowly, you should set this value to true only when debugging and to
false at all other times. For more information, refer to the documentation about
debugging ASP.NET files.
-->
<compilation
defaultLanguage="c#"
debug="true"
/>

<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.

"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommended for security purposes, so
that you do not display application detail information to remote clients.
-->
<customErrors
mode="Off"
/>

<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"

"None" No authentication is performed.
"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
its settings for the application. Anonymous access must be disabled in IIS.
"Forms" You provide a custom form (Web page) for users to enter their credentials, and then
you authenticate them in your application. A user credential token is stored in a cookie.
"Passport" Authentication is performed via a centralized authentication service provided
by Microsoft that offers a single logon and core profile services for member sites.
-->
<authentication mode="Windows" />

<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
(unauthenticated) users.
-->

<authorization>
<allow users="*" /> <!-- Allow all users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>

<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<trace
enabled="false"
requestLimit="10"
pageOutput="false"
traceMode="SortByTime"
localOnly="true"
/>

<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
-->
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<globalization
requestEncoding="Windows-1251"
responseEncoding="Windows-1251"
culture="ru-RU"
uiCulture="ru"
/>

</system.web>
<appSettings>
<add key="SqlString" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=xxx\xxx\xxx\basa\basa.mdb" />
<add key="basa" value="mdb"/>
<add key="Smtp" value="127.0.0.1"/>
<add key="Count_news" value="5"/>
</appSettings>

</configuration>

FSou1 21.04.2012 15:39

Подскажите, что же добавлять в проекте ASP .NET MVC вместо этого кода в представление?

<efe:SapeLinks runat="server"/>

2И если есть люди, которые уже устанавливали этот код, то просьба помочь за вознаграждение.

FSou1 22.04.2012 18:36

Неужели всем так сложно помочь? О_О

Daks 25.04.2012 15:43

Цитата:

Сообщение от kotbert (Сообщение 1209567)
Есть инструкция как добавлять код asp.net

Но что делать если в web.config'е нет необходимых веток?

Например, нет пути configSections, нет веток system.web/pages/controls.
При добавлении необходимых веток сразу сайт ломается и возникает куча ошибок.

Пример Web-config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<system.web>

<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to
false will improve runtime performance of this application.
Set compilation debug="true" to insert debugging symbols (.pdb information)
into the compiled page. Because this creates a larger file that executes
more slowly, you should set this value to true only when debugging and to
false at all other times. For more information, refer to the documentation about
debugging ASP.NET files.
-->
<compilation
defaultLanguage="c#"
debug="true"
/>

<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.

"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommended for security purposes, so
that you do not display application detail information to remote clients.
-->
<customErrors
mode="Off"
/>

<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"

"None" No authentication is performed.
"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
its settings for the application. Anonymous access must be disabled in IIS.
"Forms" You provide a custom form (Web page) for users to enter their credentials, and then
you authenticate them in your application. A user credential token is stored in a cookie.
"Passport" Authentication is performed via a centralized authentication service provided
by Microsoft that offers a single logon and core profile services for member sites.
-->
<authentication mode="Windows" />

<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
(unauthenticated) users.
-->

<authorization>
<allow users="*" /> <!-- Allow all users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>

<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<trace
enabled="false"
requestLimit="10"
pageOutput="false"
traceMode="SortByTime"
localOnly="true"
/>

<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
-->
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<globalization
requestEncoding="Windows-1251"
responseEncoding="Windows-1251"
culture="ru-RU"
uiCulture="ru"
/>

</system.web>
<appSettings>
<add key="SqlString" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=xxx\xxx\xxx\basa\basa.mdb" />
<add key="basa" value="mdb"/>
<add key="Smtp" value="127.0.0.1"/>
<add key="Count_news" value="5"/>
</appSettings>

</configuration>

Та же проблема с установкой...

Igor V 25.04.2012 18:11

Web-config... тфу.. а ручками прикрутить не сутьба?
то чо тут под асп предлогали ваще юзать нельзя..

VAU 28.04.2012 20:47

effetto, Вы здесь?
Хотел поблагодарить за код, но старые посты не оцениваются.

effetto 02.05.2012 12:27

Теперь здесь, однако пару месяцев отсутствовал :) Более отсутствовать не планирую.

Добавлено через 2 минуты
Цитата:

Сообщение от FSou1 (Сообщение 1233476)
Подскажите, что же добавлять в проекте ASP .NET MVC вместо этого кода в представление?

<efe:SapeLinks runat="server"/>

2И если есть люди, которые уже устанавливали этот код, то просьба помочь за вознаграждение.

Добрый день, FSou1.

Для MVC гораздо проще использовать программный вывод, нежели декларативный. В документации имеются примеры. Если помощь еще требуется, мы можем установить для Вас код. Мои контакты в начале темы, мой скайп (предпочтительно) ph_effetto.

Добавлено через 1 минуту
Цитата:

Сообщение от Daks (Сообщение 1235117)
Та же проблема с установкой...

Добрый день, Daks!

Заполнение конфига пораздельно описано в инструкции. Инструкция находится в начале темы.

Добавлено через 2 минуты
Цитата:

Сообщение от JeryMouse (Сообщение 1204652)
Добрый день

Неожиданно с нескольких сайтов ASP.NET пропали все ссылки.
Все ссылки находятся в статусе ERROR - не найденна.
На сайтах ничего не менялось, код Sape не удалялся.

Проверил по указанной здесь инструкции - отсутствовали папки App_Data
(подчеркну, что до этого все работало нормально - изменения на сайтах не делались, по всей видимости работало без App_Data)

Создал папки App_Data - в них появились файлы sape.bin
и регулярно обновляются. Ссылок пока не вижу.

Можно ли как то проверить правильность работы?
В чем может быть причина?

День добрый, JeryMouse!

Если конфигурация по умолчанию (файловая), то без изменений со стороны такого быть не могло. Но причина ясна: папка App_Data обязательно должна присутствовать. Если файл sape.bin не пустой, то все должно работать. Так же вы можете в конфиге подключить чек код для проверки работы движка.


Часовой пояс GMT +3, время: 07:02.

Работает на vBulletin® версия 3.8.7.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot
SAPE.RU — система купли-продажи ссылок с главных и внутренних страниц сайтов.