I am very new in server management thing. I want to make email accounts like [email protected].
I know something to do with Sendmail thing , but dunno what ?
I am on Ubuntu 10 server.
I have a website and I have kept the structure to be:
Website
Web Application 1
Web Application 2
Now, I want to access my website at example.com and access web applications using webapp1.example.com or webapp2.example.com; I have a control panel for my domain name from where I have set up a “web forward” to my server.
From what I have done, I am getting to see my IP address when I type in domain name. Yes, I have disabled cloaking here!
How I would like it to be is, when I access example.com and then navigate to other pages, they should be shown in the address bar, e.g. http://example.com/firstpage.aspx and so forth.
Is the structure I have set up a good one?
Hello!
We currently use smartd to monitor SMART health on our disks. I would like to set the 'thresholds' that smartd uses to report.
For example:
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 9
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 9
I would like to be able to set a threshold for these two attributes to only report if they are above 10. I haven't been able to find a way to set this via smartd.conf, and I'm also not looking to actually shutdown the daemon.
Has anyone ever tried this, or know how I might be able to accomplish this better then throwing a script into cron.hourly?
I am very very new to this and just trying to configure SMTP virtual server. I have followed a few threads to get it all running, but the mails are not being delivered.
What I have done so far -
1) Install SMTP server.
2) SMTP server Properties
General Tab - IP address is set to 'All Unassigned'.
Access Tab - Authentication is anonymous access. Everything else is left to Default settings.
Delivery Tab - Outbound security is anonymous access. In Advance section, entered the domain name in the FQDN field, and localhost in Smart host field.
3) Created an Inbound Rule for SMTP service to allow connections to Port 25.
When I try to telnet, everything works up until the point the mail has to be send. Now, the sender's domain is different to the receiver's domain.
Not sure if settings have to be changed to allow that?
I had set the Relay restrictions on SMTP server, but because I couldn't send the mails, I thought I might as well make it work without the relay first.
The error I see while sending the mail is 451 Timeout waiting for client input.
I used to get some other error before when I had Relay restrictions on.
Can anyone please point me in the right direction? Please let me know if you need more information.
Thanks.
I am trying to set up rules to highlight both trailing whitespace and lines which are over a certain length by adding this to my .vimrc:
highlight ExtraWhitespace ctermbg=lightgray guibg=lightgray
match ExtraWhitespace /\s\+$/
highlight OverLength ctermbg=lightgray guibg=lightgray
match OverLength /\%>80v.\+/
However, it only seems to pick up whichever is last. I can't find a way to get them to both work simultaneously.
We are a team of three, all working on our local machines on the same internal network.
We will all be working on websites in local working copies of the same Git repo hosted on Github.
We have an internal staging machine here (dev.internal), and I am looking for a way for us to be able to push to this machine. At each milestone in the development cycle.
In essence, all I really want us to be able to do is add the dev.internal machine as a remote, and push to this whenever we are ready.
Could somebody please point me in the right direction to get this set up?
I am on a low budget right now. I am currently in the process of starting a computer company.
I am in need of a VPN network so I can run Dameware tools for working on customers/partners computers remotely. I will be working with Windows and some Apple and linux machines.
I have desktop with an AMD Phenom II 965BE(currently running stable at 3.8Ghz) processor with 8 GB of ram and a radeon hd 6870(i know graphics aren't too useful) and about 1.5TB of HDD space.
I am attempting to create a network out of my office based all on one machine that would also be secure for me to remotely connect to my partners computers so when they have issues I would be able to connect and do the diagnosing and repairs remotely.
What types of servers besides a VPN server would i need to create this? I have access to all Microsoft products so I can run Windows Server 2012, Windows Server 2008 R2, or any other Microsoft Software.
thanks for the help all
This is what I want and I am having issues finding a solution.
I have a number of websites (around 5) each with an email account. I have a server at my office and I would like to centralize it. I have a workstation too.
What I want to happen is for the server to receive all emails from all those websites (from the web servers) and then connect my workstation to my local server to grab the emails from there. As the server downloads the emails, I would like them to be stored. Also, if I connect another workstation, I want the 2 workstations to sync. So if an email is read on one, it shows up as read on the other.
Ideas? I am able to virtualize a Linus environment if that helps.
I am trying to setup a mysql server on my machine. I would like to limit the domains that it listens for connections to. My understanding is that you can either have it listen to 1 ip or all ip's. Therefore, if i want to connect remotely I have to say all ips. Then I would like to block all domains but the ones I know should actually be connecting.. I believe this is done through windows firewall. However, how do i do this by domain instead of IP?
I am working on getting an iPad to auth to an IIS7.5 website using a local certificate mapped to a user in AD.
I am not, in any sense of the word, an IIS admin.
I essentially need to setup a proof of concept. I believe that this may work, but I just have no idea how to do it.
What I have so far is an iPad with a user certificate installed. I have this user certificate added the correlating user account in AD.
What I would like is a basic text webpage to load showing the user that it is authenticating. I would like this page to not be viewable unless it is client certificate authenticated.
I don't mind doing the legwork, but I really don't know where to begin on the IIS side.
Can anyone point me in the right direction?
I have set the "when firefox starts" and "home page" values, but when I reboot the computer (or more accurately, when I restart the computer as it has been crashing frequently of late), those values get reset to some default value which I don't want.
If I close Firefox then reopen, the correct values appear.
How I do store the values over reboots?
The values are
when firefox starts: show a blank page
home page: about:blank
I'm still using Windows XP so there's no problem about directory permissions.
I am successfully using Powershell with SMO to backup most databases. However, I have several large databases in which I receive a "timeout" error "System.Data.SqlClient.SqlException: Timeout expired". The timout consistently occurs at 10 minutes. I have tried setting ConnectionContext.StatementTimeout to 0, 6000, and to [System.Int32]::MaxValue. The setting made no difference. I have found a number of Google references which indicate setting it to 0 makes it unlimited. No matter what I try, the timeouts consistently occur at 10 minutes. I even set Remote Query Timeout on the server to 0 (via Studio Manager) to no avail. Below is my SMO connection where I set the time out and the actual backup function. Further below is the output from my script.
UPDATE
Interestingly enough, I wrote the backup function in C# using VS 2008 and the timeout override does work within that environment. I am in the process of incorporating that C# process into my Powershell Script until I can find out why the timeout override does not work with just Powershell. This is extremely annoying!
function New-SMOconnection {
Param ($server,
$ApplicationName= "PowerShell SMO",
[int]$StatementTimeout = 0
)
# Write-Debug "Function: New-SMOconnection $server $connectionname $commandtimeout"
if (test-path variable:\conn) {
$conn.connectioncontext.disconnect()
} else {
$conn = New-Object('Microsoft.SqlServer.Management.Smo.Server') $server
}
$conn.connectioncontext.applicationName = $applicationName
$conn.ConnectionContext.StatementTimeout = $StatementTimeout
$conn.connectioncontext.Connect()
$conn
}
$smo = New-SMOConnection -server $server
if ($smo.connectioncontext.isopen -eq $false) {
Throw "Could not connect to server $($server)."
}
Function Backup-Database {
Param([string]$dbname)
$db = $smo.Databases.get_Item($dbname)
if (!$db) {"Database $dbname was not found"; Return}
$sqldir = $smo.Settings.BackupDirectory + "\$($smo.name -replace ("\\", "$"))"
$s = ($server.Split('\'))[0]
$basedir = "\\$s\" + $($sqldir -replace (":", "$"))
$dt = get-date -format yyyyMMdd-HHmmss
$dbbk = new-object ('Microsoft.SqlServer.Management.Smo.Backup')
$dbbk.Action = 'Database'
$dbbk.BackupSetDescription = "Full backup of " + $dbname
$dbbk.BackupSetName = $dbname + " Backup"
$dbbk.Database = $dbname
$dbbk.MediaDescription = "Disk"
$target = "$basedir\$dbname\FULL"
if (-not(Test-Path $target)) { New-Item $target -ItemType directory | Out-Null}
$device = "$sqldir\$dbname\FULL\" + $($server -replace("\\", "$")) + "_" + $dbname + "_FULL_" + $dt + ".bak"
$dbbk.Devices.AddDevice($device, 'File')
$dbbk.Initialize = $True
$dbbk.Incremental = $false
$dbbk.LogTruncation = [Microsoft.SqlServer.Management.Smo.BackupTruncateLogType]::Truncate
If (!$copyonly) {
If ($kill) {$smo.KillAllProcesses($dbname)}
$dbbk.SqlBackupAsync($server)
}
$dbbk
}
Started SQL backups for server LCFSQLxxx\SQLxxx at 05/06/2010 15:33:16
Statement TimeOut value set to 0.
DatabaseName : OperationsManagerDW
StartBackupTime : 5/6/2010 3:33:16 PM
EndBackupTime : 5/6/2010 3:43:17 PM
StartCopyTime : 1/1/0001 12:00:00 AM
EndCopyTime : 1/1/0001 12:00:00 AM
CopiedFiles :
Status : Failed
ErrorMessage : System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The backup or restore was aborted.
10 percent processed.
20 percent processed.
30 percent processed.
40 percent processed.
50 percent processed.
60 percent processed.
70 percent processed.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
Ended backups at 05/06/2010 15:43:23
I am using ASP.NET 2.0 AJAX Extensions 1.0 with the version v1.0.20229 of the AJAX Control Toolkit (which to my knowledge is the latest for .NET 2.0/Visual Studio 2005).
My web page (aspx) has a DropDownList control on an UpdatePanel. In the handler for the DropDownList's SelectedIndexChanged event I attempt to set a session variable.
The first time the event is fired, I get a Sys.WebForms.PageRequestManagerParserErrorException: "The message received from the server could not be parsed". If I continue, subsequent SelectedIndexChanged's are handled successfully.
I have stumbled upon a solution whereby if I initialise the session variable in my Page_Load (so the event handler is just setting the value of a session variable that already exists as opposed to creating a new one) the problem goes away.
I'm happy to do this, but I'm curious as to exactly what the underlying cause is. Can anyone explain?
(My suspicion is that setting the session variable receives a response from the server which is then returned to the 'caller', but it's not the sort of response it knows how to deal with causing the exception?)
EDIT: I reproduced the problem in a seperate little project:
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SessionTest._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<asp:UpdatePanel id="upCategorySelector" runat="server">
<ContentTemplate>
Category:
<asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlCategories_SelectedIndexChanged">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
Default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace SessionTest
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// If I do this, the exception does not occur.
if (Session["key"] == null)
Session.Add("key", 0);
}
protected void ddlCategories_SelectedIndexChanged(object sender, EventArgs e)
{
// If Session["key"] has not been created, setting it from
// the async call causes the excaption
Session.Add("key", ((DropDownList)sender).SelectedValue);
}
}
}
In my iOS app I'm creating and presenting a UINavigationController modally like so:
MyViewController *myvc = [[[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil] autorelease];
UINavigationController *navVC = [[[UINavigationController alloc] initWithRootViewController:myvc] autorelease];
[self presentModalViewController:navVC animated:YES];
In the MyViewController viewDidLoad I'm creating and setting toolbar items for the navigation controller's toolbar, like so:
self.navigationController.toolbar.items = [NSArray arrayWithObjects:(items...), nil];
the problem I'm having is that the items don't show up. If instead I call a method from MyViewController's viewDidLoad method that adds the toolbar items via performSelector:withObject:afterDelay:0, then it works perfectly. So there's obviously some race condition going on here with the initial presentation of the UINavigationController, initialization of its toolbar/navbar, and the initialization of the nav bar's specified initial root view controller.
I verified in the debugger that the root view controller's viewDidLoad is called after the UINavigationController's viewDidLoad method. In fact, the root view controller's viewDidLoad method is not called until presentModalViewController: is called, and the UINavigationController's viewDidLoad is called within initWithRootViewController, so doesn't that imply that the UINavigationController object should be "all ready to go", including its nav bar and toolbars?
I thought at first that the navigation controller's toolbar object may not exist yet at MyViewController's viewDidLoad time, but it clearly does. At least, NSLog shows that it is not nil during MyViewController's viewDidLoad method. In fact, the UINavigationController's toolbar object is identical at both times: in the root view controller's viewDidLoad, and in the "setupToolbar" method that I called with performSelector:withObject:afterDelay, so it's not getting "re-initialized" somehow.
So, what's going on here? Why aren't my toolbar modifications "sticking" in MyViewController's viewDidLoad, and why does performing them in the next iteration of the runloop (performSelector:withObject:afterDelay:0) make it work?
What is the "right" way of setting up initial navbar / toolbar items in code from the rootViewController of the UINavigationController?
I was reading in Google's documentation about improving site speed. One of their recommendations is serving static content (images, css, js, etc.) from a "cookieless domain":
Static content, such as images, JS and
CSS files, don't need to be
accompanied by cookies, as there is
no user interaction with these
resources. You can decrease request
latency by serving static resources
from a domain that doesn't serve
cookies.
Google then says that the best way to do this is to buy a new domain and set it to point to your current one:
To reserve a cookieless domain for
serving static content, register a new
domain name and configure your DNS
database with a CNAME record that
points the new domain to your existing
domain A record. Configure your web
server to serve static resources from
the new domain, and do not allow any
cookies to be set anywhere on this
domain. In your web pages, reference
the domain name in the URLs for the
static resources.
This is pretty straight forward stuff, except for the bit where it says to "configure your web server to serve static resources from the new domain, and do not allow any cookies to be set anywhere on this domain". From what I've read, there's no setting in IIS that allows you to say "serve static resources", so how do I prevent ASP.NET from setting cookies on this new domain?
At present, even if I'm just requesting a .jpg from the new domain, it sets a cookie on my browser, even though our application's cookies are set to our old domain. For example, ASP.NET sets an ".ASPXANONYMOUS" cookie that (as far as I'm aware) we're not telling it to do.
Apologies if this is a real newb question, I'm new at this!
Thanks.
Hello,
I have an ASP.NET website for which i've set the authetication timeout to 60 days so that my users don't have to log in each time they come back if they checked the "remember me" option. Basic ASP.NET login mechanism...
It's working fine on my developpement server as well as on the visual studio built-in web server. I can close the browser, wait around 30-40 minutes and browse back to the site and be automatically logged in.
However, I've not moved the site to a hosting provider and it seems that whatever I do to my Web.config file, the cookie expires after around 30 minutes (hard to tell the exact amount of time). I have asked the provider's help support and they basically told me:
"Web.config file is to configure your website. Please do not change it if you don't know what you are doing"
Frustrating answer indeed...
To be sure, I checked everywhere on the net for exceptions, fine prints, in the basic asp.net authentication but found none.
I have access to IIS remote management for my site (IIS 7) but don't really know where to look. Can there be something in the IIS setting that is overriding my web.config authentication setting? What should I do...
Thanks for you help!
I have used the following code in setting alarm time in AlarmManager class. Now Suppose my device current date 9-july-2012 11:31:00, Now suppose i set set a alarm at 9-july-2012 11:45:00, then it works fine and pop-up an alarm at that time. But if i set an alarm at 10-aug-2012 11:40:00, then as soon as exit the app the alarm pop-up, which is wrong because i set an alarm at month of august, So why this happen, is anything wrong in my code. if anyone knows help me to solve this out.
Code For Setting Alarm time in AlarmManager class
Intent myIntent = new Intent(context, AlarmService.class);
PendingIntent pendingIntent = PendingIntent.getService(context, i, myIntent, i);
AlarmManager alarmManager = (AlarmManager)context.getSystemService(AlarmService.ALARM_SERVICE);
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(System.currentTimeMillis());
calendar.add(Calendar.MILLISECOND, (int) dateDifferenceFromSystemTime(NoteManager.getSingletonObject().getAlarmTime(i)));
alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);
public static long dateDifferenceFromSystemTime(Date date)
{
long difference = 0;
try
{
Calendar c = Calendar.getInstance();
difference = date.getTime() - c.getTimeInMillis();
if (difference < 0)
{
// if difference is -1 - means alarm time is of previous time then current
// then firstly change it to +positive and subtract form 86400000 to get exact new time to play alarm
// 86400000-Total no of milliseconds of 24hr Day
difference = difference * -1;
difference = 86400000 - difference;
}
}
catch (Exception e)
{
e.printStackTrace();
}
return difference;
}
Service class which pop-up alarm when matches time
public class AlarmService extends IntentService
{
public void onCreate()
{
super.onCreate();
}
public AlarmService()
{
super("MyAlarmService");
}
@Override
public int onStartCommand(Intent intent, int flags, int startId)
{
super.onStartCommand(intent, startId, startId);
return START_STICKY;
}
@Override
protected void onHandleIntent(Intent intent)
{
startActivity(new Intent(this,AlarmDialogActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}
}
I'm using .NET 3.5. We have some complex third-party classes which are automatically generated and out of my control, but which we must work with for testing purposes. I see my team doing a lot of deeply-nested property getting/setting in our test code, and it's getting pretty cumbersome.
To remedy the problem, I'd like to make a fluent interface for setting properties on the various objects in the hierarchical tree. There are a large number of properties and classes in this third-party library, and it would be too tedious to map everything manually.
My initial thought was to just use object initializers. Red, Blue, and Green are properties, and Mix() is a method that sets a fourth property Color to the closest RGB-safe color with that mixed color. Paints must be homogenized with Stir() before they can be used.
Bucket b = new Bucket() {
Paint = new Paint() {
Red = 0.4;
Blue = 0.2;
Green = 0.1;
}
};
That works to initialize the Paint, but I need to chain Mix() and other methods to it. Next attempt:
Create<Bucket>(Create<Paint>()
.SetRed(0.4)
.SetBlue(0.2)
.SetGreen(0.1)
.Mix().Stir()
)
But that doesn't scale well, because I'd have to define a method for each property I want to set, and there are hundreds of different properties in all the classes. Also, C# doesn't have a way to dynamically define methods prior to C# 4, so I don't think I can hook into things to do this automatically in some way.
Third attempt:
Create<Bucket>(Create<Paint>().Set(p => {
p.Red = 0.4;
p.Blue = 0.2;
p.Green = 0.1;
}).Mix().Stir()
)
That doesn't look too bad, and seems like it'd be feasible. Is this an advisable approach? Is it possible to write a Set method that works this way? Or should I be pursuing an alternate strategy?
I wrote a program about 10 years ago in Visual Basic 6 which was basically a full-screen game similar to Breakout / Arkanoid but had 'demoscene'-style backgrounds. I found the program, but not the source code. Back then I hard-coded the display mode to 800x600x24, and the program crashes whenever I try to run it as a result. No virtual machine seems to support 24-bit display when the host display mode is 16/32-bit. It uses DirectX 7 so DOSBox is no use.
I've tried all sorts of decompiler and at best they give me the form names and a bunch of assembly calls which mean nothing to me. The display mode setting was a DirectX 7 call but there's no clear reference to it in the decompilation.
In this situation, is there any pointers on how I can:
pin-point the function call in the program which is setting the display mode to 800x600x24 (ResHacker maybe?) and change the value being passed to it so it sets 800x600x32
view/intercept DirectX calls being made while it's running
or if that's not possible, at least
run the program in an environment that emulates a 24-bit display
I don't need to recover the source code (as nice as it would be) so much as just want to get it running.
Hello,
In a custom ASP.NET AJAX control, i have this to do some repositioning.
var dims = Sys.UI.DomElement.getBounds(control);
this.get_element().style.position = "absolute";
//Sys.UI.DomElement.setLocation(this.get_element(), dims.x, (dims.y + dims.height));
this.get_element().style.left = dims.x;
this.get_element().style.top = (dims.y + dims.height);
getBounds simply returns the x/y and width/height. I use this to set the left/top, but in IE, it's doubling; say the coordinates are 500, 20; when it sets this on the element, its actually setting to 1000, 40. Any ideas why? In firefox, this works correctly.
this.get_element() returns the correct element and all, but it's not setting correctly, even though event logging says it's the correct coordinates. When using setLocation too, it doesn't work in either...
What else in my code may be affecting it? JQuery isn't an option here too.
Thanks.
I am trying to set up an IP camera and have it work through Silverlight I am using both Microsoft Expression and Microsoft Visual Studio 2008. I am able to do encoding with a usb connected web cam but I cannot find a way to use the encoder to connect to ip camera connected to our switch. Does anyone have experience setting up an ip camera to encode into the Silverlight framework?
When setting the ModelView matrix you normally go through several transformations from the identity matrix. for example:
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glRotatef(270.0f, 0.0f, 0.0f, 1.0f);
glTranslatef(-rect.size.height / 2, -rect.size.width / 2, 0.0f);
Instead of doing those operations one after the other (assume there are more than two), wouldn't it be more efficient to simply pre-calculate the resulting matrix and set the ModelView matrix to this manual matrix?
Hi all,
I want to set some background image of uitoolbar in my iphone application.
Currently i am setting by using the initwithpatternimage method of uicolor.
But its not doing what i want.
Kindly sujjest some other solution.
I am sure there is a simple answer to this one.
I have a docx file that I get an error when trying to download(document cannot be found).... .doc is fine .txt is also fine. I am sure this is just an iis setting, the permissions on the server are all the same for all files.
I've tried setting the style of the UINavigationbar to be a translucent style in the viewDidLoad method of my controller. But nothing is changed. Why?
I set the property using the standard code like
self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;