سلام
خوشبختانه علت خطای
Exception details: system.data.sqlclient.sqlexception: login failed for user
را پیدا کردم راه حلشو میذارم
. البته من برناممو فعلا دارم توی ای ای اس تست میکنم و هنوز روی سرور نذاشتم ولی حداقل با روش زیر توی ای ای اس خطا برطرف شده .
Microsoft sql server -> enterprise manager-> Microsoft SQL Server
SQL Server Group serverName\VSDOTNET (Windows NT)->Security
Logins >right click>
New Login
...Name<click on
اسکرول را پائین اورده و انتخاب گزینه ASPNE .
************************************************** ****************************************
حالا 1سوال هم دارم
من تو برنامم یه فولدر به نام file_upload_pic دارم که عکس ها ی کالاهایی که تو سایته درون اونه. بنابراین عکساشو به کاربر نشون میدم و کاربر هم اجازه داره که اونارو تغییر بده . زمانی که با vsdn اجراشو میگیرم درج و یا تغییر عکسام مشکلی نداره ولی توی ای ای اس هنگام ویرایش خطای زیرو میداد.منم راههای مختلفی را با روش آزمون وخطا امتحان کردم تا بالاخره به این نتیجه رسیدم که اگه فولدرم را share کنم و گزینه allow network users to change my file راتیک بزنم خطا برطرف میشه. ولی نمیدونم این راهی درست و مطمئن هست؟ شما راه دیگه ای که امن هم باشه برای رفع این خطا سراغ دارین؟
Access to the path 'E:\asp\NASR\PrecompiledWeb\file_upload_pic\dpjt\t n.jpg' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path 'E:\asp\NASR\PrecompiledWeb\file_upload_pic\dpjt\t n.jpg' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.