IIS creating a web site - iis

I'm trying to add a new web site on my IIS manager.
-> My site name is "teorikolarak.com"
-> Application pool is "DefaultAppPool"
-> Physical Path is "C:\inetpub\wwwroot\teorikolarak.com"
teorikolarak.com is a file and it contains "default.html" page.
When I click the Test Settings... button it does not return any error. Everyting seems to okey .
-> binding type: http
-> IP adress : 192.168.2.4
-> Port:80
-> HostName: www.teorikolarak.com
Also I updated hosts file. "192.168.2.4 teorikolarak.com"
Now, when I type the www.teorikolarak.com on address bar It can not found the site. Also, I typed the 192.168.2.4 on address bar, default IIS7 page is opening. why is it happens? why my default.html file doesnt appears on my browser?
Windows7 & IIS7

Click on the website in IIS Manager and then press the Explore button in the Actions panel. Do you see your default.html file? If so, double click on the "Default Document" feature (in the middle panel). Check to see if Default.html is listed as a valid default document. It probably is not. Click the Add... button in the Actions panel to add "default.html" as a valid default document. Now it should work.

can you try going to
http://teorikolarak.com/

Related

How to find URL for locally testing my theme

I tried to fetch the current theme of my NetSuite website and edit it and check it locally, but didn't find the local link.
I didn't get this part, explained on NetSuite Help Center:
To view your customized theme in a browser, navigate to the local version of the application using one of the following URLs:
http://<DOMAIN_NAME>/c.<ACCOUNT_ID>/<SSP_APPLICATION>/shopping-local.ssp
I tried the below links but not working:
http://localhost:7777/c.1234567/scs/shopping-local.ssp
https://domain-name.com/c.1234567/scs/shopping-local.ssp (I try it with my organization id and company domain name)
At localhost:7777 nothing loaded up and at the second link site loaded but without my changes in header.tpl or footer.tpl module files.
The development mode piggybacks off of the live site. Basically the live site has some special .ssp pages that, instead of loading resources from Netsuite, proxy to a service on your local host.
For example if you were running a site at http://www.mynsbasedsite.com
on site that has url root /kilimanjaro then to see your development changes you'd enter the url:
http://www.mynsbasedsite.com/c.<ACCOUNT_ID>/kilimanjaro/shopping-local.ssp
Are you running the local dev service? e.g.
gulp local
If you start that up in the last few lines you should see one or both of these:
+- Local http server available at: http://localhost:7777/
+- Local https server available at: https://localhost:7778/
If you don't see the https reference it's because you haven't created a self signed cert for your local server. Most modern browsers need some coercion to load the either of those.
e.g. when I am testing with Chrome I do the following:
open the staging url and get a blank page
open dev tools and go to the network tab
find checkout.js in red with a failed status
right click and choose 'open in new tab'
see the page warning, click 'Advanced' and click 'Proceed to localhost (unsafe)'
go back to the original tab and refresh.
the versions of SuiteCommerce I'm familiar with use Express under the hood for the local server so any ssl tutorial on Express should include a section on using openssl to generate your key and cert. Once you've created them they go in the root folder of your project and you reference them in the taskConfig section that starts like:
"tasksConfig": {
"local": {
"http": {
"port": 7777
},
"https": {
"port": 7778,
"key": "./key.pem",
"cert": "./cert.pem"
},
"lessSourcemap": false,
"jsRequire": true
},
"configuration": {
After all that navigate to your live site.

Customize Openam Login page

I want to customize OpenAm login page, for client perspective,
I had check OpenaAm Chapter for latest XUI changes, ie by default it takes XUI
I tried to configure current default theme,
present in
XUI/themeConfig.json under the directory where we unpack OpenAM,
For example.
I had modify footer element : by default footer mailto element: info#forgerock.com
"footer": {
"mailto": "info#xyz.com",
"phone": ""
}
}
after pack and deploy war file,
But still it showing old one ie info#forgerock.com on startup
My question is what is the proper steps of customizing OpenAm login page , from OpenAm guide, it was bit confusing.
Please suggest
Thanks
a)Modify XUI\config\themeConfig.json, delete cache from your web browser...Then reload page and see what you had entered.
b)You can also set org.forgerock.openam.core.resource.lookup.cache.enabled, to false in Configuration > Servers and Sites > Server Name > Advanced to see in real time your modify, but in a Production Environment remember to change again to true for better performance.
Best regards,
Alex

Change Theme of "New Password" screen

I'm using Liferay 6.2.1 EE SP6/CE.
I've modified the password policies to enable:
passwords.default.policy.change.required=true
This forces new users to change the password on first login.
When user tries to login for the first time, the user is redirected to change his password as expected, but the theme is Classic.
I have a custom theme developed for my whole site.
How can I apply this custom theme to the Change Password on first login - "New Password" screen?
Tried the below properties to no effect:
default.regular.theme.id=mycustomtheme_WAR_mycustomtheme
default.user.public.layout.regular.theme.id=mycustomtheme_WAR_mycustomtheme
default.user.private.layout.regular.theme.id=mycustomtheme_WAR_mycustomtheme
Try to set a default theme in:
Control Panel -> Configuration -> Portal Settings -> Display Settings -> Look and Feel -> Default Theme
The below portal property fixed it.
default.user.private.layout.regular.theme.id=mycustomtheme_WAR_mycustomtheme

Error in SPUtility send email

I am trying to send an email in the button click event in the webpart.However, the email sending is failed and error is logged in both sharepoint logs and event viewer of the machine.
The error is : Cannot connect to SMTP host
Outgoing email settings in central admin is already configured. Alerts are also working fine.
Below is my code:
StringDictionary headers = new StringDictionary();
headers.Add("to", "someone#abc.com");
headers.Add("from", "MySharePointEmail#myfatblog.co.uk");
headers.Add("subject", "How to use SendEMail from SPUtility");
headers.Add("content-type", "text/html");
string bodyText = "This is the body of my email, in html format.";
SPUtility.SendEmail(SPContext.Current.Web, headers, bodyText);
Thanks in advance
Try running your code without the System Account (if you are).
Try also disabling the LoopbackCheck:
To set the DisableLoopbackCheck registry key, follow these steps:
Click Start, click Run, type regedit, and then click OK.
In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Quit Registry Editor, and then restart your computer.
I got that fixed. Anti virus was causing the problem. But i am wondering how is SharePoint able to send mail then?

System.Net.WebClient doesn't work with Windows Authentication

I am trying to use System.Net.WebClient in a WinForms application to upload a file to an IIS6 server which has Windows Authentication as
it only 'Authentication' method.
WebClient myWebClient = new WebClient();
myWebClient.Credentials = new System.Net.NetworkCredential(#"boxname\peter", "mypassword");
byte[] responseArray = myWebClient.UploadFile("http://localhost/upload.aspx", fileName);
I get a 'The remote server returned an error: (401) Unauthorized', actually it is a 401.2
Both client and IIS are on the same Windows Server 2003 Dev machine.
When I try to open the page in Firefox and enter the same correct credentials as in the code, the page comes up.
However when using IE8, I get the same 401.2 error.
Tried Chrome and Opera and they both work.
I have 'Enable Integrated Windows Authentication' enabled in the IE Internet options.
The Security Event Log has a Failure Audit:
Logon Failure:
Reason: An error occurred during logon
User Name: peter
Domain: boxname
Logon Type: 3
Logon Process: ÈùÄ
Authentication Package: NTLM
Workstation Name: boxname
Status code: 0xC000006D
Substatus code: 0x0
Caller User Name: -
Caller Domain: -
Caller Logon ID: -
Caller Process ID: -
Transited Services: -
Source Network Address: 127.0.0.1
Source Port: 1476
I used Process Monitor and Fiddler to investigate but to no avail.
Why would this work for 3rd party browsers but not with IE or System.Net.WebClient?
I have seen a similar issue, where the Integrated / NTLM security will only work if you are accessing the host by machine name or localhost. In fact, it is a [poorly] document feature in Windows that is designed to protect against "reflection attacks".
Basically, you need to create a registry key on the machine that is trying to access the server, and whitelist the domain you are trying to hit. Each host name / FQDN needs to be on it's own line - there are no wildcards and the name must match exactly. From the KB Article:
Click Start, click Run, type regedit, and then click OK.
In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
Right-click MSV1_0, point to New, and then click Multi-String Value.
Type BackConnectionHostNames, and then press ENTER.
Right-click BackConnectionHostNames, and then click Modify.
In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
Exit Registry Editor, and then restart the computer.
http://support.microsoft.com/kb/956158/en-us
Have you tried ...
new NetworkCredential( "peter", "password", "boxname" );
You might also try ...
var credCache = new CredentialCache();
credCache.Add( new Uri ("http://localhost/upload.aspx"),
"Negotiate",
new NetworkCredential("peter", "password", "boxname"));
wc.Credentials = credCache;
Also, according to this it may be that IIS is configured wrong. Try replacing "Negotiate" with "Basic" in the above and checking your IIS config for the website. There's also a bunch of possible causes here.
Try going into IE's options and explicitly add the site to the Intranet Zone. Then re-run the program. You should also not run the program from an administrator login. This may trigger the Enhanced Security Configuration for Internet Explorer.
It could explain why you can hit the site with Firefox and Opera, but not with IE or WebClient.
Without knowing your IIS deployment, and assuming that you have the correct authorization rules for upload set in IIS (e.g. the right allow* ACL's on the right dirs you are trying to upload content to, etc), first thing I would try is to set UseDefaultCredentials to true instead of explicitly set Credential. (Maybe you think you are accessing the server with the Credentials you are setting but that's not the case? That would be possible if this works.)
This is a very common scenario, so I would focus on IIS authorization rules for the directory in which you are trying to upload the file, the actual ACL's on that directory. For ex. is your site impersonating or not? if it is, then you have to have actual ACL's on that dir, otherwise whatever account app pool is running on.

Resources