نمایش نتایج 1 تا 5 از 5

نام تاپیک: خطا وقتي سايت از اينترنت مي آيد بالا

  1. #1
    کاربر دائمی
    تاریخ عضویت
    آذر 1386
    محل زندگی
    تهران
    پست
    293

    خطا وقتي سايت از اينترنت مي آيد بالا

    من سايتي را طراح كردم كه در اينترانت كار ميكند و هيچ خطايي را نميگيرد ولي وقتي در اينترنت publish كردم خطايي بصورت زير مي گيرد
    کد HTML:
    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster
     

    نميدونم اشكال از كجاست .از شماعزيزان جهت رفع مشكل راهنماييوكمك ميخواهم با تشكر

  2. #2

    نقل قول: خطا وقتي سايت از اينترنت مي آيد بالا

    یک همچین چیزی را در قسمت System.Web در web.config اضافه کنید
     <machineKey validationKey="FBF509141F22D6A3B2359A593F24C41AB87  5DE7DE122EF17" decryptionKey="A1742572A487D94018787EF42682B202B12  3451891C1BAF4" validation="SHA1" decryption="AES"/>


    البته دو کلیدی که در مثال فوق وجود دارد را خودتان تعیین کنید.

  3. #3
    کاربر دائمی آواتار aminghaderi
    تاریخ عضویت
    بهمن 1387
    محل زندگی
    مشهد
    پست
    1,557

    نقل قول: خطا وقتي سايت از اينترنت مي آيد بالا

    نقل قول نوشته شده توسط Alireza_Salehi مشاهده تاپیک
    یک همچین چیزی را در قسمت System.Web در web.config اضافه کنید
     <machineKey validationKey="FBF509141F22D6A3B2359A593F24C41AB87  5DE7DE122EF17" decryptionKey="A1742572A487D94018787EF42682B202B12  3451891C1BAF4" validation="SHA1" decryption="AES"/>
    البته دو کلیدی که در مثال فوق وجود دارد را خودتان تعیین کنید.
    این کد چی هست؟؟
    واسه چی کاری استفاده می شه؟؟
    ممنون.

  4. #4

    نقل قول: خطا وقتي سايت از اينترنت مي آيد بالا

    Machine Key Explained

    The default settings for the <pages> and <machineKey> elements are defined in the machine-level web.config.comments file. The relevant default settings are shown here for reference.
    <pages enableViewStateMac="true" viewStateEncryptionMode="Auto" ... />

    <machineKey validationKey="AutoGenerate,IsolateApps"
    decryptionKey="AutoGenerate,IsolateApps"
    validation="SHA1" decryption="Auto" />
    When you configure ViewState, the <pages> element is used in conjunction with the <machineKey> element.
    The <machineKey> attributes are as follows:

    • validationKey. This specifies the key that the HMAC algorithm uses to make ViewState tamper proof. The ViewState MAC is checked at the server when either the enableViewStateMAC attribute of the <pages> element or the EnableViewStateMac attribute of the @Page directive is set to true. <pages enableViewStateMAC="true" ... />
      or
      <%@Page EnableViewStateMac="true" ... %>
      Forms authentication also uses this key for signing the authentication ticket. Role manager and anonymous identification if enabled also uses this key for signing their cookies. If you use anonymous identification in cookieless mode, the data on the URL is also signed with this value,
    • decryptionKey. This specifies the key used to encrypt and decrypt data. Forms authentication, role manager and anonymous identification features use this key to encrypt and decrypt the authentication ticket, roles cookie and anonymous identification cookie. ASP.NET uses the key to encrypt and decrypt ViewState, but only if the validation attribute is set to AES or 3DES.
    • decryption. This specifies the symmetric encryption algorithm used to encrypt and decrypt forms authentication tickets.
    • validation. This specifies the hashing algorithm used to generate HMACs to make ViewState and forms authentication tickets tamper proof. This attribute is also used to specify the encryption algorithm used for ViewState encryption. This attribute supports the following options:
      • SHA1–SHA1 is used to tamper proof ViewState and, if configured, the forms authentication ticket. When SHA1 is selected for the validation attribute, the algorithm used is HMACSHA1.
      • MD5–MD5 is used to tamper proof ViewState and, if configured, the forms authentication ticket.
      • AES–AES is used to encrypt ViewState with the key specified in the decryptionKey attribute.
      • 3DES–3DES is used to encrypt ViewState with the key specified in the decryptionKey attribute. This is the only way to encrypt ViewState in ASP.NET 1.1. Both the forms authentication ticket and the ViewState are tamper-proofed using SHA-1 and the key specified in the validationKey attribute. Because the validation attribute is overloaded in ASP.NET 1.1, ASP.NET 2.0 introduces a new decryption attribute.

    In general, you should choose SHA1 over MD5 for tamper-proofing because this produces a larger hash than MD5 and is considered cryptographically stronger.
    Forms authentication defaults to SHA1 for tamper proofing (if <forms protection="validation" or "All"). When <forms protection="All"> or <forms protection = "Encryption">, then forms authentication hashes the forms authentication ticket by using either MD5 or HMACSHA1 (HMACSHA1 is used even if validation is set to AES or 3DES). Forms authentication then encrypts the ticket using the algorithm specified in the decryption attribute. (The decryption attribute was introduced in ASP.NET 2.0.)


    http://msdn.microsoft.com/en-us/library/ff649308.aspx
    http://msdn.microsoft.com/en-us/library/w8h3skw9.aspx

    جهت تولید کلید ها هم machine key generator را گوگل کنید، مثلا:
    http://www.developmentnow.com/articl...generator.aspx

  5. #5

    نقل قول: خطا وقتي سايت از اينترنت مي آيد بالا

    توضیح کاملی در مورد علت اتفاق افتادن خطای فوق:
    http://www.aspnetajaxtutorials.com/2...sters-web.html

    نحوه راه اندازی web garden :
    http://www.microsoft.com/technet/pro....mspx?mfr=true

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •