PDA

View Full Version : سوال: مشكل با Captcha در IIS7



smh_5800
دوشنبه 20 تیر 1390, 10:11 صبح
سلام
از دوستان برنامه نویس - کسانیکه با کامپونت تصاویر امنیتی آقای Saber_Fatholahi (http://barnamenevis.org/showthread.php?126644-%D8%AF%D9%86%D9%84%D9%88%D8%AF-%DA%A9%D8%A7%D9%85%D9%BE%D9%88%D9%86%D9%86%D8%AA-%D8%AA%D8%B5%D8%A7%D9%88%DB%8C%D8%B1-%D8%A7%D9%85%D9%86%DB%8C%D8%AA%DB%8C-%D8%A8%D8%A7-%D9%82%D8%A7%D8%A8%D9%84%DB%8C%D8%AA-%D9%81%D8%B1%D8%A7%D9%88%D8%A7%D9%86&highlight=IIS7)
کار کردند به من در استفاده از این کامپونت در IIS7 کمک کنند
قبلا جستجو کردم و از لینک های زیر استفاده کردم اما مشکل من حل نشد
لینک ۱ (http://barnamenevis.org/showthread.php?273351-%D8%AA%D9%86%D8%B8%DB%8C%D9%85%D8%A7%D8%AA-IIS7-%D8%AF%D8%B1-%D9%81%D8%A7%DB%8C%D9%84-web.config&highlight=IIS7)
لینک ۲ (http://www.barnamenevis.org/showthread.php?241962-%D8%AD%D9%84-%D9%85%D8%B4%D9%83%D9%84-%D9%86%D9%85%D8%A7%D9%8A%D8%B4-%D8%B9%D9%83%D8%B3-Captcha-%D8%AF%D8%B1-IIS7&p=1076331#post1076331)

من پس از استفاده از لینک ۲ به خطای زیر می رسم - لطفا کمک کنید

خطا :
Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3

web config


<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="connString" value="server=192.168.2.100;uid=sa;pwd=81111;database=smh"/>
</appSettings>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<httpHandlers>
<add verb="GET" path="CaptchaImage.aspx" type="PWS.Security.Captcha.PWSCaptchaImageHandler, PWSCaptchaControl"/>
</httpHandlers>
<compilation debug="true" strict="false" explicit="true">
</compilation>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Generic"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>

<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
<handlers>
<add name="SafaCaptchaControl"
verb="GET"
path="CaptchaImage.aspx"
type="Safa.Security.Captcha.SafaCaptchaImageHandler, SafaCaptchaControl"/>

<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
</configuration>

smh_5800
سه شنبه 21 تیر 1390, 11:29 صبح
با تشکر از دوست گرامی ( didaaa (http://barnamenevis.org/member.php?101373-didaaa) ) مشکل حل شد
اما فایل کانفیگ مورد نظر که در IIS7 به درستی کار می کند.
----------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="connString" value="server=192.168.2.100;uid=sa;pwd=123456;database=de mo"/>
</appSettings>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<httpHandlers>
<add verb="GET" path="CaptchaImage.aspx" type="PWS.Security.Captcha.PWSCaptchaImageHandler, PWSCaptchaControl"/>
</httpHandlers>
<compilation debug="true" strict="false" explicit="true">
</compilation>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Generic"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>

<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
</modules>
<handlers>
<add name="PWSCaptchaControl" verb="GET" path="CaptchaImage.aspx" type="PWS.Security.Captcha.PWSCaptchaImageHandler, PWSCaptchaControl"/>
</handlers>
</system.webServer>
</configuration>

----------------------------------------------------------------------------------------------------------------------------