Thursday, June 30, 2011

remove fotolia water mark

Neil,

"neil" <niuz...@gmail.com> writes:
>    these days I find the some comp image in my website have the fotolia
>    watermark.
>    why?
>    I have the reseller API.
You have to be logged in order not to have the fotolia watermark on the
comp files. The simpliest way to do it is to use once user.loginUser API
mehod to retrieve your session ID and then to include it to your subsequent
calls to the comp urls. For example:
// get session ID
$res = user.loginUser($api_key, $login, $password);
$session_id = $res['session_id'];

// get comp url
$comp = media.getMediaComp($api_key, $id);
$comp_url = $comp['url'];

// fetch comp with the session ID cookie
system('curl -H PHPSESSID: ' . $session_id . ' ' . $comp_url);

Missing - Local Users and Groups

Try starting a new MMC console by going to Start -> Run -> "mmc". This will
bring up a blank console. Go to File -> Add/Remove Snap-In and click Add...

From the list, select local users and groups, from the dialog box that
appears select Local Computer. Clcik finish and the console window should
display properly. If this doesn't work it could suggest an underlying problem.

Monday, June 27, 2011

The server committed a protocol violation: Section=ResponseStatusLine

f you get an error like "The server committed a protocol violation", you may have some of the following problem (which can be solved by one of the provided solution as well).
Unsafe header parsing
Unsafe header parsing is an option you can turn on on your ASP.Net website (in the web.config) to allow the framework to parse responses. But what is an unsafe header ? It is a header in which the keys contains one or more spaces (that is not allowed in the HTTP 1.1 specifications).
The common case is having a space in the "content-length" header key. The server actually returns a "content length" key, which, assuming no spaces are allowed, is considered as an attack vector (HTTP response split attack), thus, triggering a "HTTP protocol violation error" exception.
To allow the parsing of unsafe headers, add the following to your web.config :

<system.net>
   <settings>
      <httpWebRequest useUnsafeHeaderParsing="true" />
   </settings>
</system.net>
You forgot to allow HttpGet and/or HttpPost on your web.config
If you call a WebService, you must accept the HttpGet and/or HttpPost protocols in your web.config (they are disabled by default).
So add the following to your web.config file :

<configuration>
  <system.web>
    <webServices>
      <protocols>
        <add name="HttpGet"/>
        <add name="HttpPost"/>
      </protocols>
    </webServices>
  </system.web>
</configuration>
You're using Skype
If you use Skype, make sure to uncheck the option for using port 80 and 443.
None of the above: find it yourself
If this has not helped, use the following links to help you find the answer :
Configure network tracing : http://msdn2.microsoft.com/en-us/library/ty48b824.aspx
Interpreting a network trace : http://msdn2.microsoft.com/en-us/library/46fcs6sz.aspx

Thursday, June 23, 2011

ASP.NET There is a problem with your selected data store

go to
C:\Windows\Microsoft.NET\Framework\v4.0.30319 and run aspnet_regsq,exe

Then

u try editing the web.config file...

there is lot more to do with that..
hav u created ur own database for your application. If so you have to
give the connection string for that database.

This is my webconfig file. see this and try. I tried for about 3 days
to that.

if u didn't include the roleManager then we can't create the roles and
it states and error message saying "website not configured to enable
roles"


<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/
v2.0">
<appSettings/>
<connectionStrings>
<add name="MySqlProviderConnection"
connectionString="server=localhost;integrated security =
true;database=aspnetdb" />
</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.
-->
<compilation debug="true"/>
<authorization>
<deny users="?"/>
</authorization>
<membership defaultProvider="MySqlMembershipProvider">
<providers>
<add connectionStringName="MySqlProviderConnection"
enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="true"
applicationName="/" requiresUniqueEmail="true"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10" name="MySqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" />
</providers>
</membership>

<roleManager enabled="true" defaultProvider="SqlRoleProvider">
<providers>
<clear />
<add applicationName="MyAppName"
connectionStringName="MySqlProviderConnection"
name="SqlRoleProvider"
type="System.Web.Security.SqlRoleProvider" />
</providers>
</roleManager>

Wednesday, June 22, 2011

Login failed for user 'IIS APPPOOL\ASP.NET v4.0'. at System.Data.SqlClient.SqlInternalConnection

just go to IIS -> application pool -> and set Identity to local system. By default it is Applicationpoolidentity.

loading you personal settings is slow

you just need to drill down to:
HKEY_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> Windows ->
CurrentVersion -> Policies -> System
Then: Edit/New/DWORD Value - give it the name
of 'verbosestatus'.
Then: Edit/Modify - set 'Value Date' to 1.

now, you can find the root cause.

Friday, June 17, 2011

MSDTC on server is unavailable Error

You would need to enable MS DTC on the server and ensure that it is enabled for remote access if the sql server and website are on different machines.
You can turn on the service from the 'Administrative Tools' -> 'Services' option, you can enable remote access by going into 'Component Services' -> 'Computer' -> 'My Computer' -> 'Properties'  -> 'MSDTC' tab -> 'Security Configuration'.
Also you would need to update the connection string and add 'enlist=false' attribute.
Hope that helps,